mirror of
https://github.com/lancedb/lancedb.git
synced 2026-12-03 07:45:17 +00:00
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:
@@ -625,6 +625,7 @@
|
||||
"group": "Embedding Providers",
|
||||
"pages": [
|
||||
"integrations/embedding/huggingface",
|
||||
"integrations/embedding/assetfeed",
|
||||
"integrations/embedding/aws",
|
||||
"integrations/embedding/cohere",
|
||||
"integrations/embedding/colpali",
|
||||
|
||||
Reference in New Issue
Block a user