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

This commit is contained in:
Bagatur
2024-09-03 23:35:51 -07:00
committed by GitHub
parent 179aaa4007
commit c0448f27ba

View File

@@ -322,7 +322,7 @@ class OpenAIEmbeddings(BaseModel, Embeddings):
"'http_client'/'http_async_client' is already specified. Received:\n"
f"{openai_proxy=}\n{http_client=}\n{http_async_client=}"
)
if not (self.client or None):
if not self.client:
if self.openai_proxy and not self.http_client:
try:
import httpx