Skip to content

Commit

Permalink
correct syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallori Harrell authored and Mallori Harrell committed Oct 3, 2023
1 parent 2eb7fe4 commit d6eea67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unstructured/embed/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def is_unit_vector(self):
return np.isclose(np.linalg.norm(self.examplary_embedding), 1.0)

def embed_query(self, query):
return self.openai_client.embed_documents([str(query)])
return self.openai_client.embed_documents(str(query))

def embed_documents(self, elements: List[Element]) -> List[Element]:
embeddings = self.openai_client.embed_documents([str(e) for e in elements])
Expand Down

0 comments on commit d6eea67

Please sign in to comment.