Skip to content

Commit

Permalink
fix linting (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 authored Feb 2, 2024
1 parent 8c96def commit 68358e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _from_pg_to_haystack_documents(self, documents: List[Dict[str, Any]]) -> Lis

# postgresql returns the embedding as a string
# so we need to convert it to a list of floats
if "embedding" in document and document["embedding"]:
if document.get("embedding"):
haystack_dict["embedding"] = [float(el) for el in document["embedding"].strip("[]").split(",")]

haystack_document = Document.from_dict(haystack_dict)
Expand Down

0 comments on commit 68358e7

Please sign in to comment.