trustgraph/tests/unit/test_embeddings
cybermaggedon 0a2ce47a88
Batch embeddings (#668)
Base Service (trustgraph-base/trustgraph/base/embeddings_service.py):
- Changed on_request to use request.texts

FastEmbed Processor
(trustgraph-flow/trustgraph/embeddings/fastembed/processor.py):
- on_embeddings(texts, model=None) now processes full batch efficiently
- Returns [[v.tolist()] for v in vecs] - list of vector sets

Ollama Processor (trustgraph-flow/trustgraph/embeddings/ollama/processor.py):
- on_embeddings(texts, model=None) passes list directly to Ollama
- Returns [[embedding] for embedding in embeds.embeddings]

EmbeddingsClient (trustgraph-base/trustgraph/base/embeddings_client.py):
- embed(texts, timeout=300) accepts list of texts

Tests Updated:
- test_fastembed_dynamic_model.py - 4 tests updated for new interface
- test_ollama_dynamic_model.py - 4 tests updated for new interface

Updated CLI, SDK and APIs
2026-03-08 18:36:54 +00:00
..
__init__.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
conftest.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
test_embedding_logic.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
test_embedding_utils.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
test_embeddings_service_contract.py Dynamic embeddings model (#556) 2025-11-10 20:38:01 +00:00
test_fastembed_dynamic_model.py Batch embeddings (#668) 2026-03-08 18:36:54 +00:00
test_huggingface_dynamic_model.py Dynamic embeddings model (#556) 2025-11-10 20:38:01 +00:00
test_ollama_dynamic_model.py Batch embeddings (#668) 2026-03-08 18:36:54 +00:00
test_row_embeddings_processor.py Batch embeddings (#668) 2026-03-08 18:36:54 +00:00