Replies: 3 comments 2 replies
-
Hey @Vincsi, great to see you back! Hope you've been well since our last chat. Based on the information you've provided, it seems like you're trying to access the Claude 3 model from the Anthropic publisher, but the model location you're using is for the Google publisher. This is likely the cause of the In your code, you're using the model = VertexAI(model_name="claude-3-haiku@20240307") However, the model name you're using ( Try changing the model name to model = VertexAI(model_name="publishers/anthropic/models/claude-3-haiku@20240307") As for accessing Anthropic models using the Model Garden, it's currently unclear whether LangChain supports this directly. The LangChain repository does not seem to contain any references to a If changing the model name does not resolve your issue, or if you have further questions about accessing Anthropic models with LangChain, please provide more details about your use case and any error messages you're encountering. This will help me provide more accurate and helpful advice. Sources
|
Beta Was this translation helpful? Give feedback.
-
I've made it work by changing the
and calling:
Does that work for you? |
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
Anthropic models in GCP model garden are directly managed by google and do not have an endpoint like other LLM (e.g. deployed version of LLAMA 2).
How can Anthropic models be accessed using the Model Garden?
I also tried using the VertexAI integration by listing the Claude3 model instead of Gemini but I receive the following error
**publishers/google/models/claude-3-haiku@20240307**
is not found.When I explore the Claude 3 model card on GCP the Anthropic models are stored in a different location:
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