Retrying langchain.embeddings.openai.embed_with_retry.<locals>._embed_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')). #11767
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Ɑ: embeddings
Related to text embedding models module
System Info
llm = ChatOpenAI(model_name="gpt-4", temperature=0.5, request_timeout=300)
qa_chain = ConversationalRetrievalChain.from_llm(
verbose=True,
llm=llm,
retriever=retriever,
return_source_documents=True,
combine_docs_chain_kwargs={"prompt": prompt},
rephrase_question=False,
)
given code I get error:
Retrying langchain.embeddings.openai.embed_with_retry.._embed_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')).
Who can help?
No response
Information
Related Components
Reproduction
llm = ChatOpenAI(model_name="gpt-4", temperature=0.5, request_timeout=300)
qa_chain = ConversationalRetrievalChain.from_llm(
verbose=True,
llm=llm,
retriever=retriever,
return_source_documents=True,
combine_docs_chain_kwargs={"prompt": prompt},
rephrase_question=False,
)
Expected behavior
successfully call OpenAI embedding api
The text was updated successfully, but these errors were encountered: