mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-24 14:18:05 +02:00
Fixing user fields
This commit is contained in:
parent
cf5041eeb0
commit
0bc97b9374
4 changed files with 13 additions and 5 deletions
|
|
@ -584,7 +584,7 @@ class AsyncFlowInstance:
|
|||
result = await self.request("document-rag", request_data)
|
||||
return result.get("response", "")
|
||||
|
||||
async def graph_embeddings_query(self, text: str, user: str, collection: str, limit: int = 10, **kwargs: Any):
|
||||
async def graph_embeddings_query(self, text: str, collection: str, limit: int = 10, user: str = "", **kwargs: Any):
|
||||
"""
|
||||
Query graph embeddings for semantic entity search.
|
||||
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ class AsyncSocketFlowInstance:
|
|||
if hasattr(chunk, 'content'):
|
||||
yield chunk.content
|
||||
|
||||
async def graph_embeddings_query(self, text: str, user: str, collection: str, limit: int = 10, **kwargs):
|
||||
async def graph_embeddings_query(self, text: str, collection: str, limit: int = 10, user: str = "", **kwargs):
|
||||
"""Query graph embeddings for semantic search"""
|
||||
emb_result = await self.embeddings(texts=[text])
|
||||
vector = emb_result.get("vectors", [[]])[0]
|
||||
|
|
|
|||
|
|
@ -755,9 +755,9 @@ class SocketFlowInstance:
|
|||
def graph_embeddings_query(
|
||||
self,
|
||||
text: str,
|
||||
user: str,
|
||||
collection: str,
|
||||
limit: int = 10,
|
||||
user: str = "",
|
||||
**kwargs: Any
|
||||
) -> Dict[str, Any]:
|
||||
"""Query knowledge graph entities using semantic similarity."""
|
||||
|
|
@ -777,9 +777,9 @@ class SocketFlowInstance:
|
|||
def document_embeddings_query(
|
||||
self,
|
||||
text: str,
|
||||
user: str,
|
||||
collection: str,
|
||||
limit: int = 10,
|
||||
user: str = "",
|
||||
**kwargs: Any
|
||||
) -> Dict[str, Any]:
|
||||
"""Query document chunks using semantic similarity."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue