The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[minor]: Add async_client for Anyscale Chat model (#18050)
kYLe56b955fc3167
diff --git a/libs/community/langchain_community/chat_models/anyscale.py b/libs/community/langchain_community/chat_models/anyscale.pyindex c2916ccf71..214b77c30f 100644--- a/libs/community/langchain_community/chat_models/anyscale.py+++ b/libs/community/langchain_community/chat_models/anyscale.py@@ -144,7 +144,12 @@ class ChatAnyscale(ChatOpenAI):# "default_query": values["default_query"],# "http_client": values["http_client"],}- values["client"] = openai.OpenAI(**client_params).chat.completions+ if not values.get("client"):+ values["client"] = openai.OpenAI(**client_params).chat.completions+ if not values.get("async_client"):+ values["async_client"] = openai.AsyncOpenAI(+ **client_params+ ).chat.completionselse:values["openai_api_base"] = values["anyscale_api_base"]values["openai_api_key"] = values["anyscale_api_key"].get_secret_value()