Class VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder
java.lang.Object
dev.langchain4j.model.vertexai.anthropic.VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder
- Enclosing class:
VertexAiAnthropicChatModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()credentials(com.google.auth.oauth2.GoogleCredentials credentials) Sets the Google credentials to use for authentication.enablePromptCaching(Boolean enablePromptCaching) Enables prompt caching for Claude models.listeners(List<ChatModelListener> listeners) logRequests(Boolean logRequests) logResponses(Boolean logResponses) stopSequences(List<String> stopSequences) temperature(Double temperature)
-
Constructor Details
-
VertexAiAnthropicChatModelBuilder
public VertexAiAnthropicChatModelBuilder()
-
-
Method Details
-
project
-
location
-
modelName
-
maxTokens
-
temperature
-
topP
-
topK
-
stopSequences
public VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder stopSequences(List<String> stopSequences) -
logRequests
public VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder logRequests(Boolean logRequests) -
logResponses
public VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder logResponses(Boolean logResponses) -
listeners
public VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder listeners(List<ChatModelListener> listeners) -
enablePromptCaching
public VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder enablePromptCaching(Boolean enablePromptCaching) Enables prompt caching for Claude models. When enabled, the model will automatically cache prompts to reduce latency and costs for repeated similar requests. Only supported by Claude models that support prompt caching.- Parameters:
enablePromptCaching- whether to enable prompt caching- Returns:
- this builder
-
credentials
public VertexAiAnthropicChatModel.VertexAiAnthropicChatModelBuilder credentials(com.google.auth.oauth2.GoogleCredentials credentials) Sets the Google credentials to use for authentication. If not provided, the client will use Application Default Credentials.- Parameters:
credentials- the Google credentials to use- Returns:
- this builder
-
build
-