Skip to content

Commit

Permalink
🚧 fix(wip): pass embeddings
Browse files Browse the repository at this point in the history
  • Loading branch information
mxchinegod committed Mar 28, 2024
1 parent 3ddc0be commit 3aa6cea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion magnet/ize/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,15 @@ def search(self, payload, limit: int = 100, cb: Optional[callable] = None, instr
anns_field="embedding",
param=self.config.index.options,
limit=limit,
output_fields=['text', 'document']
output_fields=['text', 'document', 'embedding']
)
results = []
for hits_i, hits in enumerate(_results):
for hit in hits:
results.append({
'text': hit.entity.get('text'),
'document': hit.entity.get('document'),
'embedding': hit.entity.get('embedding'),
'distance': hit.distance
})
if cb:
Expand Down

0 comments on commit 3aa6cea

Please sign in to comment.