mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-27 09:26:22 +02:00
Update embeddings integration for new batch embeddings interfaces (#669)
* Fix vector extraction * Fix embeddings integration
This commit is contained in:
parent
0a2ce47a88
commit
919b760c05
12 changed files with 55 additions and 56 deletions
|
|
@ -72,12 +72,13 @@ class Query:
|
|||
if self.verbose:
|
||||
logger.debug("Computing embeddings...")
|
||||
|
||||
qembeds = await self.rag.embeddings_client.embed(query)
|
||||
qembeds = await self.rag.embeddings_client.embed([query])
|
||||
|
||||
if self.verbose:
|
||||
logger.debug("Done.")
|
||||
|
||||
return qembeds
|
||||
# Return the vector set for the first (only) text
|
||||
return qembeds[0] if qembeds else []
|
||||
|
||||
async def get_entities(self, query):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue