langchain
32da0a4d - langchain[patch]: use async_embed_with_retry in _aget_len_safe_embeddings (#14110)

Commit
2 years ago
langchain[patch]: use async_embed_with_retry in _aget_len_safe_embeddings (#14110) **Description** `embed_with_retry` is for sync operations and not for async operations. Use `async_embed_with_retry` for appropriate async operations. I'm using `OpenAIEmbedding(http_client=httpx.AsyncClient())` with only async operations. However, I got an error when I use `embedding.aembed_documents` because `embed_with_retry` uses sync OpenAI client with async http client.
Author
Parents
Loading