Class AnthropicChatOptions
java.lang.Object
org.springframework.ai.anthropic.AnthropicChatOptions
- All Implemented Interfaces:
org.springframework.ai.chat.prompt.ChatOptions, org.springframework.ai.model.ModelOptions, org.springframework.ai.model.tool.StructuredOutputChatOptions, org.springframework.ai.model.tool.ToolCallingChatOptions
public class AnthropicChatOptions
extends Object
implements org.springframework.ai.model.tool.ToolCallingChatOptions, org.springframework.ai.model.tool.StructuredOutputChatOptions
The options to be used when sending a chat request to the Anthropic API.
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Thomas Vitale, Alexandros Pappas, Ilayaperumal Gopinathan, Soby Chacko, Austin Dase
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions
DEFAULT_TOOL_EXECUTION_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AnthropicChatOptions.Builderbuilder()copy()booleanstatic AnthropicChatOptionsfromOptions(AnthropicChatOptions fromOptions) getModel()List<org.springframework.ai.tool.ToolCallback> getTopK()getTopP()inthashCode()voidsetCacheOptions(AnthropicCacheOptions cacheOptions) voidsetCitationDocuments(List<CitationDocument> citationDocuments) voidsetHttpHeaders(Map<String, String> httpHeaders) voidsetInternalToolExecutionEnabled(Boolean internalToolExecutionEnabled) voidsetMaxTokens(Integer maxTokens) voidvoidvoidvoidsetOutputSchema(String outputSchema) voidsetSkillContainer(AnthropicApi.SkillContainer skillContainer) voidsetStopSequences(List<String> stopSequences) voidsetTemperature(Double temperature) voidvoidsetToolCallbacks(List<org.springframework.ai.tool.ToolCallback> toolCallbacks) voidsetToolChoice(AnthropicApi.ToolChoice toolChoice) voidsetToolContext(Map<String, Object> toolContext) voidsetToolNames(Set<String> toolNames) voidvoidvoidValidate that all citation documents have consistent citation settings.
-
Constructor Details
-
AnthropicChatOptions
public AnthropicChatOptions()
-
-
Method Details
-
getCacheOptions
-
setCacheOptions
-
getSkillContainer
-
setSkillContainer
-
builder
-
fromOptions
-
getModel
- Specified by:
getModelin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setModel
-
getMaxTokens
- Specified by:
getMaxTokensin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setMaxTokens
-
getMetadata
-
setMetadata
-
getStopSequences
-
setStopSequences
-
getTemperature
- Specified by:
getTemperaturein interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setTemperature
-
getTopP
- Specified by:
getTopPin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setTopP
-
getTopK
- Specified by:
getTopKin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setTopK
-
getToolChoice
-
setToolChoice
-
getThinking
-
setThinking
-
getToolCallbacks
- Specified by:
getToolCallbacksin interfaceorg.springframework.ai.model.tool.ToolCallingChatOptions
-
setToolCallbacks
- Specified by:
setToolCallbacksin interfaceorg.springframework.ai.model.tool.ToolCallingChatOptions
-
getToolNames
-
setToolNames
-
getInternalToolExecutionEnabled
- Specified by:
getInternalToolExecutionEnabledin interfaceorg.springframework.ai.model.tool.ToolCallingChatOptions
-
setInternalToolExecutionEnabled
- Specified by:
setInternalToolExecutionEnabledin interfaceorg.springframework.ai.model.tool.ToolCallingChatOptions
-
getFrequencyPenalty
- Specified by:
getFrequencyPenaltyin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getPresencePenalty
- Specified by:
getPresencePenaltyin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getToolContext
-
setToolContext
-
getHttpHeaders
-
setHttpHeaders
-
getCitationDocuments
-
setCitationDocuments
-
validateCitationConsistency
public void validateCitationConsistency()Validate that all citation documents have consistent citation settings. Anthropic requires all documents to have citations enabled if any do. -
getOutputFormat
-
setOutputFormat
-
getOutputSchema
- Specified by:
getOutputSchemain interfaceorg.springframework.ai.model.tool.StructuredOutputChatOptions
-
setOutputSchema
- Specified by:
setOutputSchemain interfaceorg.springframework.ai.model.tool.StructuredOutputChatOptions
-
copy
- Specified by:
copyin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
equals
-
hashCode
-