Commit 96ca62c
authored
Add 0078 Jina embed + rerank wire mapping (#209)
Add JinaEmbeddingProvider (/v1/embeddings) and JinaRerankProvider
(/v1/rerank) realizing the retrieval-provider 0078 Jina wire mapping:
the input_type -> task closed set (query -> retrieval.query, document ->
retrieval.passage; an unrecognized value is rejected pre-send), token
usage reported (total_tokens -> input_tokens), and the vendor error map
(429 -> provider_rate_limit, 422 -> provider_invalid_request).
The rerank document echo unwraps Jina's TextDoc object form
({"text": ...}) as well as a bare string, since the live API returns
the object shape when return_documents is true.
Reuse the general wire-capture conformance harness (un-defer fixtures
018-022) and add an expected_wire_headers subset check so the Bearer
auth assertions are live. Env-gated live tests cover embed, rerank, and
the return_documents echo.1 parent b1b655e commit 96ca62c
7 files changed
Lines changed: 1386 additions & 20 deletions
File tree
- src/openarmature/retrieval
- providers
- tests
- conformance
- integration
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
783 | | - | |
| 782 | + | |
784 | 783 | | |
785 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
786 | 787 | | |
787 | 788 | | |
788 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
0 commit comments