Update libs/partners/openai/langchain_openai/llms/base.py

This commit is contained in:
Bagatur
2024-09-03 23:36:19 -07:00
committed by GitHub
parent c1ff61669d
commit 4c7afb0d6c

View File

@@ -190,7 +190,7 @@ class BaseOpenAI(BaseLLM):
if not self.client: if not self.client:
sync_specific = {"http_client": self.http_client} sync_specific = {"http_client": self.http_client}
self.client = openai.OpenAI(**client_params, **sync_specific).completions # type: ignore[arg-type] self.client = openai.OpenAI(**client_params, **sync_specific).completions # type: ignore[arg-type]
if not (self.async_client or None): if not self.async_client:
async_specific = {"http_client": self.http_async_client} async_specific = {"http_client": self.http_async_client}
self.async_client = openai.AsyncOpenAI( self.async_client = openai.AsyncOpenAI(
**client_params, **client_params,