Fix doc embeddings invocation (#672)

* Fix doc embeddings invocation

* Tidy query embeddings invocation
This commit is contained in:
cybermaggedon 2026-03-09 11:07:32 +00:00 committed by GitHub
parent f2ae0e8623
commit b2ef7bbb8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 9 deletions

View file

@ -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}, ...]}
```
"""

View file

@ -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