Class VertexAiAnthropicChatModel

java.lang.Object
dev.langchain4j.model.vertexai.anthropic.VertexAiAnthropicChatModel
All Implemented Interfaces:
ChatModel, Closeable, AutoCloseable

public class VertexAiAnthropicChatModel extends Object implements ChatModel, Closeable
Represents a Google Vertex AI Anthropic language model with a chat completion interface. Supports Claude models through Vertex AI's Model Garden.
Please follow these steps before using this model:
1. Authentication
When developing locally, you can use one of:
a) Google Cloud SDK
b) Service account When using service account, ensure that GOOGLE_APPLICATION_CREDENTIALS environment variable points to your JSON service account key.
2. Enable Vertex AI Model Garden
3. Request access to Claude models in Vertex AI Model Garden
4. Model names must include version suffixes. Try one of these formats:
- "claude-3-5-sonnet-v2@20241022" (Claude 3.5 Sonnet v2) - "claude-3-5-haiku@20241022" (Claude 3.5 Haiku) - "claude-3-5-sonnet@20240620" (Claude 3.5 Sonnet) - "claude-3-opus@20240229" (Claude 3 Opus)
Note: Model availability depends on your Google Cloud project's access to Anthropic models in Vertex AI Model Garden.