The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community: fix an issue with deepinfra integration (#28715)
Nawaf Alharbidecd77c515f5
diff --git a/libs/community/langchain_community/chat_models/deepinfra.py b/libs/community/langchain_community/chat_models/deepinfra.pyindex bb5309a6c4..a0875aa8fe 100644--- a/libs/community/langchain_community/chat_models/deepinfra.py+++ b/libs/community/langchain_community/chat_models/deepinfra.py@@ -207,6 +207,10 @@ class ChatDeepInfra(BaseChatModel):# client: Any #: :meta private:model_name: str = Field(default="meta-llama/Llama-2-70b-chat-hf", alias="model")"""Model name to use."""++ url: str = "https://api.deepinfra.com/v1/openai/chat/completions"+ """URL to use for the API call."""+deepinfra_api_token: Optional[str] = Nonerequest_timeout: Optional[float] = Field(default=None, alias="timeout")temperature: Optional[float] = 1@@ -469,7 +473,7 @@ class ChatDeepInfra(BaseChatModel):)def _url(self) -> str:- return "https://stage.api.deepinfra.com/v1/openai/chat/completions"+ return self.urldef _headers(self) -> Dict:return {