Class GoogleGenAiChatOptions
java.lang.Object
org.springframework.ai.google.genai.GoogleGenAiChatOptions
- 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 GoogleGenAiChatOptions
extends Object
implements org.springframework.ai.model.tool.ToolCallingChatOptions, org.springframework.ai.model.tool.StructuredOutputChatOptions
Options for the Google GenAI Chat API.
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Thomas Vitale, Grogdunn, Ilayaperumal Gopinathan, Soby Chacko, Dan Dobrin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classstatic classstatic enum -
Field Summary
Fields inherited from interface org.springframework.ai.model.tool.ToolCallingChatOptions
DEFAULT_TOOL_EXECUTION_ENABLED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGoogleGenAiChatOptions(String model, Double frequencyPenalty, Integer maxOutputTokens, Double presencePenalty, List<String> stopSequences, Double temperature, Integer topK, Double topP, Boolean internalToolExecutionEnabled, @Nullable List<org.springframework.ai.tool.ToolCallback> toolCallbacks, @Nullable Set<String> toolNames, @Nullable Map<String, Object> toolContext, Integer candidateCount, String responseMimeType, String responseSchema, Integer thinkingBudget, Boolean includeThoughts, GoogleGenAiThinkingLevel thinkingLevel, Boolean includeExtendedUsageMetadata, String cachedContentName, Boolean useCachedContent, Integer autoCacheThreshold, Duration autoCacheTtl, Boolean googleSearchRetrieval, Boolean includeServerSideToolInvocations, List<GoogleGenAiSafetySetting> safetySettings, Map<String, String> labels) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()copy()booleanstatic GoogleGenAiChatOptionsfromOptions(GoogleGenAiChatOptions fromOptions) getModel()List<org.springframework.ai.tool.ToolCallback> getTopK()getTopP()inthashCode()mutate()voidsetAutoCacheThreshold(Integer autoCacheThreshold) voidsetAutoCacheTtl(Duration autoCacheTtl) voidsetCachedContentName(String cachedContentName) voidsetCandidateCount(Integer candidateCount) voidsetFrequencyPenalty(Double frequencyPenalty) voidsetGoogleSearchRetrieval(Boolean googleSearchRetrieval) voidsetIncludeExtendedUsageMetadata(Boolean includeExtendedUsageMetadata) voidsetIncludeServerSideToolInvocations(Boolean includeServerSideToolInvocations) voidsetIncludeThoughts(Boolean includeThoughts) voidsetInternalToolExecutionEnabled(@Nullable Boolean internalToolExecutionEnabled) voidvoidsetMaxOutputTokens(Integer maxOutputTokens) voidsetMaxTokens(Integer maxTokens) voidvoidsetOutputSchema(String jsonSchemaText) voidsetPresencePenalty(Double presencePenalty) voidsetResponseMimeType(String mimeType) voidsetResponseSchema(String responseSchema) voidsetSafetySettings(List<GoogleGenAiSafetySetting> safetySettings) voidsetStopSequences(List<String> stopSequences) voidsetTemperature(Double temperature) voidsetThinkingBudget(Integer thinkingBudget) voidsetThinkingLevel(GoogleGenAiThinkingLevel thinkingLevel) voidsetToolCallbacks(List<org.springframework.ai.tool.ToolCallback> toolCallbacks) voidsetToolContext(Map<String, Object> toolContext) voidsetToolNames(Set<String> toolNames) voidvoidvoidsetUseCachedContent(Boolean useCachedContent) toString()
-
Constructor Details
-
GoogleGenAiChatOptions
public GoogleGenAiChatOptions() -
GoogleGenAiChatOptions
protected GoogleGenAiChatOptions(String model, Double frequencyPenalty, Integer maxOutputTokens, Double presencePenalty, List<String> stopSequences, Double temperature, Integer topK, Double topP, Boolean internalToolExecutionEnabled, @Nullable List<org.springframework.ai.tool.ToolCallback> toolCallbacks, @Nullable Set<String> toolNames, @Nullable Map<String, Object> toolContext, Integer candidateCount, String responseMimeType, String responseSchema, Integer thinkingBudget, Boolean includeThoughts, GoogleGenAiThinkingLevel thinkingLevel, Boolean includeExtendedUsageMetadata, String cachedContentName, Boolean useCachedContent, Integer autoCacheThreshold, Duration autoCacheTtl, Boolean googleSearchRetrieval, Boolean includeServerSideToolInvocations, List<GoogleGenAiSafetySetting> safetySettings, Map<String, String> labels)
-
-
Method Details
-
builder
-
fromOptions
-
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
-
getCandidateCount
-
setCandidateCount
-
getMaxTokens
- Specified by:
getMaxTokensin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setMaxTokens
-
getMaxOutputTokens
-
setMaxOutputTokens
-
getModel
- Specified by:
getModelin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
setModel
-
getResponseMimeType
-
setResponseMimeType
-
getResponseSchema
-
setResponseSchema
-
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
-
setFrequencyPenalty
-
setPresencePenalty
-
getThinkingBudget
-
setThinkingBudget
-
getIncludeThoughts
-
setIncludeThoughts
-
getThinkingLevel
-
setThinkingLevel
-
getIncludeExtendedUsageMetadata
-
setIncludeExtendedUsageMetadata
-
getCachedContentName
-
setCachedContentName
-
getUseCachedContent
-
setUseCachedContent
-
getAutoCacheThreshold
-
setAutoCacheThreshold
-
getAutoCacheTtl
-
setAutoCacheTtl
-
getGoogleSearchRetrieval
-
setGoogleSearchRetrieval
-
getIncludeServerSideToolInvocations
-
setIncludeServerSideToolInvocations
-
getSafetySettings
-
setSafetySettings
-
getLabels
-
setLabels
-
getToolContext
-
setToolContext
-
getOutputSchema
- Specified by:
getOutputSchemain interfaceorg.springframework.ai.model.tool.StructuredOutputChatOptions
-
setOutputSchema
- Specified by:
setOutputSchemain interfaceorg.springframework.ai.model.tool.StructuredOutputChatOptions
-
equals
-
hashCode
-
toString
-
copy
- Specified by:
copyin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
mutate
- Specified by:
mutatein interfaceorg.springframework.ai.chat.prompt.ChatOptions
-