Skip to content

Commit

Permalink
huggingface[fix]: model parameter passing error when async embed
Browse files Browse the repository at this point in the history
  • Loading branch information
af su committed Nov 17, 2024
1 parent 0a57fc0 commit fe5126c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ async def aembed_documents(self, texts: List[str]) -> List[List[float]]:
texts = [text.replace("\n", " ") for text in texts]
_model_kwargs = self.model_kwargs or {}
responses = await self.async_client.post(
json={"inputs": texts, "parameters": _model_kwargs}, task=self.task
json={"inputs": texts, **_model_kwargs}, task=self.task
)
return json.loads(responses.decode())

Expand Down

0 comments on commit fe5126c

Please sign in to comment.