feat(python): add AssetFeed embedding provider (#5257)

Adds an `assetfeed` text embedding provider for the AssetFeed embeddings
API (`assetfeed/assetfeed-embed-v1`). It uses the existing optional
`openai` client with AssetFeed's OpenAI-compatible endpoint, as the
`nvidia` provider does.

- Documents are embedded with `input_type="document"`, searches with
`input_type="query"`.
- `dim` is 1024 (default), 512 or 256. Batches are at most 64 inputs.
- The key comes from `ASSETFEED_API_KEY` or an `api_key` registry
variable reference.
- Response count, indices, dimensions and values are checked. Null and
empty text get a null vector without a request.
- Each request is retried on its own with LanceDB's retry policy.

Python and docs only (`integrations/embedding/assetfeed`). No dependency
changes.

### Testing

- `test_assetfeed_embeddings.py`: 18 mocked-HTTP tests through the real
OpenAI client, no network. They cover request shape, batching, response
order, null inputs, a local table, retries and invalid responses.
- Registry and trust suites: pass. `ruff check` passes.
- Not tested live: no API key was used.

---
This commit is contained in:
Nikolai Vysotskyi
2026-11-30 20:18:29 +08:00
committed by GitHub
parent d0dfa0d8f0
commit 41637c646e
5 changed files with 429 additions and 0 deletions
+1
View File
@@ -625,6 +625,7 @@
"group": "Embedding Providers",
"pages": [
"integrations/embedding/huggingface",
"integrations/embedding/assetfeed",
"integrations/embedding/aws",
"integrations/embedding/cohere",
"integrations/embedding/colpali",