Class AnthropicChatOptions.AbstractBuilder<B extends AnthropicChatOptions.AbstractBuilder<B>>
java.lang.Object
org.springframework.ai.chat.prompt.DefaultChatOptionsBuilder<B>
org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B>
org.springframework.ai.anthropic.AnthropicChatOptions.AbstractBuilder<B>
- All Implemented Interfaces:
org.springframework.ai.chat.prompt.ChatOptions.Builder<B>, org.springframework.ai.model.tool.StructuredOutputChatOptions.Builder<B>, org.springframework.ai.model.tool.ToolCallingChatOptions.Builder<B>
- Direct Known Subclasses:
AnthropicChatOptions.Builder
- Enclosing class:
AnthropicChatOptions
protected abstract static class AnthropicChatOptions.AbstractBuilder<B extends AnthropicChatOptions.AbstractBuilder<B>>
extends org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B>
implements org.springframework.ai.model.tool.StructuredOutputChatOptions.Builder<B>
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Thomas Vitale, Alexandros Pappas, Ilayaperumal Gopinathan, Soby Chacko, Austin Dase
-
Field Summary
Fields inherited from class org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder
internalToolExecutionEnabled, toolCallbacks, toolContext, toolNamesFields inherited from class org.springframework.ai.chat.prompt.DefaultChatOptionsBuilder
frequencyPenalty, maxTokens, model, presencePenalty, stopSequences, temperature, topK, topP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCitationDocument(AnthropicCitationDocument citationDocument) build()cacheOptions(AnthropicCacheOptions cacheOptions) citationDocuments(List<AnthropicCitationDocument> citationDocuments) citationDocuments(AnthropicCitationDocument... citationDocuments) combineWith(org.springframework.ai.chat.prompt.ChatOptions.Builder<?> other) customHeaders(Map<String, String> customHeaders) disableParallelToolUse(@Nullable Boolean disableParallelToolUse) effort(com.anthropic.models.messages.OutputConfig.Effort effort) Convenience method to set the effort level for the model's response.httpHeaders(Map<String, String> httpHeaders) maxRetries(@Nullable Integer maxRetries) metadata(@Nullable com.anthropic.models.messages.Metadata metadata) model(@Nullable com.anthropic.models.messages.Model model) outputConfig(@Nullable com.anthropic.models.messages.OutputConfig outputConfig) Sets the output configuration for controlling response format and effort.outputSchema(@Nullable String outputSchema) skill(AnthropicSkill anthropicSkill) skill(AnthropicSkillRecord skill) skill(AnthropicSkill anthropicSkill, String version) skillContainer(@Nullable AnthropicSkillContainer skillContainer) thinking(@Nullable com.anthropic.models.messages.ThinkingConfigParam thinking) Convenience method to let Claude adaptively decide whether to think.Convenience method to explicitly disable thinking.thinkingEnabled(long budgetTokens) Convenience method to enable thinking with a specific budget in tokens.toolChoice(@Nullable com.anthropic.models.messages.ToolChoice toolChoice) Methods inherited from class org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder
internalToolExecutionEnabled, toolCallbacks, toolCallbacks, toolContext, toolContext, toolNames, toolNamesMethods inherited from class org.springframework.ai.chat.prompt.DefaultChatOptionsBuilder
frequencyPenalty, maxTokens, model, presencePenalty, self, stopSequences, temperature, topK, topPMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions.Builder
frequencyPenalty, maxTokens, model, presencePenalty, stopSequences, temperature, topK, topP
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder()
-
-
Method Details
-
outputSchema
- Specified by:
outputSchemain interfaceorg.springframework.ai.model.tool.StructuredOutputChatOptions.Builder<B extends AnthropicChatOptions.AbstractBuilder<B>>
-
baseUrl
-
apiKey
-
timeout
-
maxRetries
-
proxy
-
customHeaders
-
model
-
metadata
-
toolChoice
-
thinking
-
thinkingEnabled
Convenience method to enable thinking with a specific budget in tokens.- Parameters:
budgetTokens- the thinking budget (must be >= 1024 and invalid input: '<' maxTokens)
-
thinkingAdaptive
Convenience method to let Claude adaptively decide whether to think. -
thinkingDisabled
Convenience method to explicitly disable thinking. -
disableParallelToolUse
-
citationDocuments
-
citationDocuments
-
addCitationDocument
-
cacheOptions
-
outputConfig
Sets the output configuration for controlling response format and effort.- Parameters:
outputConfig- the output configuration- Returns:
- this builder
-
effort
Convenience method to set the effort level for the model's response.- Parameters:
effort- the desired effort level (LOW, MEDIUM, HIGH, MAX)- Returns:
- this builder
-
httpHeaders
-
skillContainer
-
skill
-
skill
-
skill
-
skill
-
skill
-
skills
-
skills
-
combineWith
- Specified by:
combineWithin interfaceorg.springframework.ai.chat.prompt.ChatOptions.Builder<B extends AnthropicChatOptions.AbstractBuilder<B>>- Overrides:
combineWithin classorg.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B extends AnthropicChatOptions.AbstractBuilder<B>>
-
build
- Specified by:
buildin interfaceorg.springframework.ai.chat.prompt.ChatOptions.Builder<B extends AnthropicChatOptions.AbstractBuilder<B>>- Specified by:
buildin interfaceorg.springframework.ai.model.tool.ToolCallingChatOptions.Builder<B extends AnthropicChatOptions.AbstractBuilder<B>>- Overrides:
buildin classorg.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B extends AnthropicChatOptions.AbstractBuilder<B>>
-