Replies: 3 comments 2 replies
-
Hey @rickywck, great to see you back! Hope you've been doing well since our last interaction. 😊 Based on the information available in the LangChain repository, it's clear that the framework does support Google's Vertex AI models. This is evident from the import statements and the usage of The Given this, it's possible that the error you're encountering when trying to use the "claude-3-sonnet@20240229" model might be due to the model not being supported or not being correctly referenced. I recommend checking the official Google Vertex AI documentation or reaching out to their support to confirm if the Claude 3 models are available and how to correctly reference them. Once you have this information, you can then use it to correctly set the If the Claude 3 models are indeed available and you're referencing them correctly, but you're still encountering the error, it might be an issue with the LangChain framework itself. In this case, it would be helpful to have more detailed error messages or logs to further investigate the issue. I hope this helps! If you have any more questions or need further clarification, feel free to ask. Sources
|
Beta Was this translation helpful? Give feedback.
-
Hey @rickywck, I had the same problem! The "ChatAnthropicVertex" class has been available for a few days now. It worked well for me with the "claude-3-haiku@20240307" model. For the other two models Sonnet and Opus I currently get an error code 500 "anthropic.InternalServerError".
|
Beta Was this translation helpful? Give feedback.
-
This worked for me: from langchain_google_vertexai.model_garden import ChatAnthropicVertex
# Initialize the ChatAnthropicVertex object
llm = ChatAnthropicVertex(
model_name="claude-3-opus@20240229",
project=PROJECT_ID,
location=LOCATION
)
# Call the invoke method with your input text
response = llm.invoke("Hello, how are you?")
# Print the response
print(response.content)
|
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I would like to access Claude 3 models via Vertex AI, in this particular case, "claude-3-sonnet@20240229". The above code ran fine with using "gemini-pro" as the model. However, if I put "claude-3-sonnet@20240229" as model name, I will get error which saying the model can't be found.
Documentation on Google site is indeed not entirely clear, e.g. Claude 3 sonnet is available in Model Garden, however it is not listed in https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/overview.
Is it a limitation now we can't access Claude 3 model(s) from Vertex AI yet via langchain yet?
System Info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found:
Beta Was this translation helpful? Give feedback.
All reactions