Skip to content

Commit

Permalink
Minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fzliu committed Oct 17, 2024
1 parent f663c9f commit 192edba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/kotaemon/kotaemon/embeddings/voyageai.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ def invoke(
self, text: str | list[str] | Document | list[Document], *args, **kwargs
) -> list[DocumentWithEmbedding]:
texts = [t.content for t in self.prepare_input(text)]
embeddings = self._client.embed()
embeddings = self._client.embed(texts, model=self.model_name).embeddings
return _format_output(texts, embeddings)

async def ainvoke(
self, text: str | list[str] | Document | list[Document], *args, **kwargs
) -> list[DocumentWithEmbedding]:
texts = [t.content for t in self.prepare_input(text)]
embeddings = await self._aclient.embed(texts)
embeddings = await self._aclient.embed(texts, model=self.model_name).embeddings
return _format_output(texts, embeddings)

0 comments on commit 192edba

Please sign in to comment.