Commit b1b655e
authored
Add TEI wire mapping (0077) (#208)
Add the first retrieval wire mapping: TeiEmbeddingProvider (POST /embed)
and TeiRerankProvider (POST /rerank) against the TEI self-hosted
endpoints. The rerank provider chunk-and-stitches when the document pool
exceeds chunk_size (TEI's max-client-batch-size): one request per
consecutive slice, indices re-based to absolute positions, a global sort
by score descending, then top_k. TEI returns no usage object, so both
responses carry usage = null (never fabricated).
Add input_type to EmbeddingRuntimeConfig (the cross-vendor query /
document knob, realized here as TEI's prompt_name or a client-side
prefix). Widen EmbeddingResponse.raw / RerankResponse.raw to dict | list,
carrying the provider's verbatim response (proposal 0096, adopted ahead
of the v0.90.0 pin): a bare-array response as its list, a chunked call as
the list of per-request responses.
Introduce the general wire-capture conformance directive family
(mapping / expected_wire_request[+_count] / *_provider blocks) that the
remaining wire mappings reuse, plus a live env-gated TEI integration
test. Un-defer fixtures 013-017; conformance.toml 0077 -> implemented,
0093 -> partial.1 parent 3347cb3 commit b1b655e
9 files changed
Lines changed: 1548 additions & 70 deletions
File tree
- src/openarmature/retrieval
- providers
- tests
- conformance
- integration
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
773 | | - | |
774 | | - | |
775 | | - | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
776 | 776 | | |
777 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
778 | 780 | | |
779 | 781 | | |
780 | 782 | | |
| |||
885 | 887 | | |
886 | 888 | | |
887 | 889 | | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
893 | 893 | | |
894 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
6 | 8 | | |
7 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
0 commit comments