mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-12 06:42:11 +02:00
The batch embeddings refactor (PR #668) changed the EmbeddingsRequest schema from `text: str` to `texts: list[str]` and updated the base class to call `on_embeddings(request.texts, model=model)`. The Ollama and FastEmbed providers were updated to match, but the HuggingFace provider was missed: - Parameter was still named `text` (singular) instead of `texts` - `embed_documents([text])` wrapped the already-list input in another list, causing `embed_documents([["text1", "text2"]])` — a list containing a list instead of a list of strings This produces: AttributeError: 'list' object has no attribute 'replace' Fix aligns the HF provider with Ollama/FastEmbed: - Rename param `text` → `texts` - Remove redundant `[text]` wrapping - Add empty-list guard (consistent with other providers) |
||
|---|---|---|
| .. | ||
| trustgraph | ||
| pyproject.toml | ||
| README.md | ||