mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 06:18:05 +00:00
Update libs/partners/openai/langchain_openai/embeddings/base.py
This commit is contained in:
@@ -334,7 +334,7 @@ class OpenAIEmbeddings(BaseModel, Embeddings):
|
|||||||
self.http_client = httpx.Client(proxy=self.openai_proxy)
|
self.http_client = httpx.Client(proxy=self.openai_proxy)
|
||||||
sync_specific = {"http_client": self.http_client}
|
sync_specific = {"http_client": self.http_client}
|
||||||
self.client = openai.OpenAI(**client_params, **sync_specific).embeddings # type: ignore[arg-type]
|
self.client = openai.OpenAI(**client_params, **sync_specific).embeddings # type: ignore[arg-type]
|
||||||
if not (self.async_client or None):
|
if not self.async_client:
|
||||||
if self.openai_proxy and not self.http_async_client:
|
if self.openai_proxy and not self.http_async_client:
|
||||||
try:
|
try:
|
||||||
import httpx
|
import httpx
|
||||||
|
Reference in New Issue
Block a user