GoogleGenerativeAIError: Error embedding content: Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNKNOWN: ipv4:142.251.43.10:443: socket is null #19316
Replies: 4 comments 1 reply
-
Hey there, @3258089958! Good to see you back in the world of code conundrums. How’s the coding journey treating you this time? Based on the information you've provided, it seems like you're encountering a While the context provided does not explicitly show how to pass additional parameters like from langchain_google_genai import GoogleGenerativeAIEmbeddings
# Assuming the class supports a 'transport' parameter similar to ChatGoogleGenerativeAI
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001", transport="rest")
vector = embeddings.embed_query("hello, world!")
vector[:5] This modification assumes that the Unfortunately, I wasn't able to find specific information within the LangChain repository about whether the If the modification suggested above doesn't resolve the issue, it would be helpful to have more information about the specific circumstances under which the error occurs. For example, does the error occur consistently, or only under certain conditions? Are there any other error messages or logs that might provide more insight into the issue? This additional information could help in identifying the root cause of the problem and suggesting a more targeted solution. Sources
|
Beta Was this translation helpful? Give feedback.
-
Hi. I came across the same problem. Have you solve this problem? Many thanks~ |
Beta Was this translation helpful? Give feedback.
-
I encountered the same issue. By adding |
Beta Was this translation helpful? Give feedback.
-
any solutions to this? I am getting the same error but while embedding my text with an embedding model here is an overview of my problem and what all I have tried:
def create_subject_vector_db(sub_name):
I have tried splitting the load i.e. chunks into more smaller batches, tried the retry method with Exponential Backoff, also tried it running from another deivce (assuming it is a network error) |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
This error occurs:GoogleGenerativeAIError: Error embedding content: Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNKNOWN: ipv4:142.251.43.10:443: socket is null
This happened before when I ran the code llm = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.9), but it was fixed when I added transport="rest".
That is llm = ChatGoogleGenerativeAI(model="gemini-pro", transport="rest",temperature=0.9)
This code is working correctly.
I'm trying to figure out what to do with the
"from langchain_google_genai import GoogleGenerativeAIEmbeddings
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
vector = embeddings.embed_query("hello, world!")
vector[:5]" runs successfully in code like this.
System Info
This error occurs:GoogleGenerativeAIError: Error embedding content: Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNKNOWN: ipv4:142.251.43.10:443: socket is null
This happened before when I ran the code llm = ChatGoogleGenerativeAI(model="gemini-pro", temperature=0.9), but it was fixed when I added transport="rest".
That is llm = ChatGoogleGenerativeAI(model="gemini-pro", transport="rest",temperature=0.9)
This code is working correctly.
I'm trying to figure out what to do with the
"from langchain_google_genai import GoogleGenerativeAIEmbeddings
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
vector = embeddings.embed_query("hello, world!")
vector[:5]" runs successfully in code like this.
Beta Was this translation helpful? Give feedback.
All reactions