mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
Fix doc embeddings invocation (#672)
* Fix doc embeddings invocation * Tidy query embeddings invocation
This commit is contained in:
parent
f2ae0e8623
commit
b2ef7bbb8c
4 changed files with 27 additions and 9 deletions
|
|
@ -599,6 +599,7 @@ class FlowInstance:
|
|||
collection="scientists",
|
||||
limit=5
|
||||
)
|
||||
# results contains {"entities": [{"entity": {...}, "score": 0.95}, ...]}
|
||||
```
|
||||
"""
|
||||
|
||||
|
|
@ -633,7 +634,7 @@ class FlowInstance:
|
|||
limit: Maximum number of results (default: 10)
|
||||
|
||||
Returns:
|
||||
dict: Query results with chunk_ids of matching document chunks
|
||||
dict: Query results with chunks containing chunk_id and score
|
||||
|
||||
Example:
|
||||
```python
|
||||
|
|
@ -644,7 +645,7 @@ class FlowInstance:
|
|||
collection="research-papers",
|
||||
limit=5
|
||||
)
|
||||
# results contains {"chunk_ids": ["doc1/p0/c0", "doc2/p1/c3", ...]}
|
||||
# results contains {"chunks": [{"chunk_id": "doc1/p0/c0", "score": 0.95}, ...]}
|
||||
```
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -695,7 +695,7 @@ class SocketFlowInstance:
|
|||
collection="research-papers",
|
||||
limit=5
|
||||
)
|
||||
# results contains {"chunk_ids": ["doc1/p0/c0", ...]}
|
||||
# results contains {"chunks": [{"chunk_id": "...", "score": 0.95}, ...]}
|
||||
```
|
||||
"""
|
||||
# First convert text to embedding vector
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue