Skip to content

Commit

Permalink
Fix a bug for checking metadata values
Browse files Browse the repository at this point in the history
  • Loading branch information
Amna Mubashar authored and Amna Mubashar committed Jul 1, 2024
1 parent 2d93ea3 commit 570cc74
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,9 @@ def _query_result_to_documents(result: QueryResult) -> List[List[Document]]:
}

# prepare metadata
if metadatas := result.get("metadatas"):
document_dict["meta"] = dict(metadatas[i][j])
metadatas = result.get("metadatas")
if metadatas and metadatas[i][j] is not None:
document_dict["meta"] = metadatas[i][j].copy()

if embeddings := result.get("embeddings"):
document_dict["embedding"] = np.array(embeddings[i][j])
Expand Down

0 comments on commit 570cc74

Please sign in to comment.