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, Sebastien Deleuze
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classstatic classstatic final recordConfigures function calling behavior when tools are provided. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGoogleGenAiChatOptions(@Nullable String model, @Nullable Double frequencyPenalty, @Nullable Integer maxOutputTokens, @Nullable Double presencePenalty, @Nullable List<String> stopSequences, @Nullable Double temperature, @Nullable Integer topK, @Nullable Double topP, @Nullable GoogleGenAiChatOptions.ToolChoice toolChoice, @Nullable List<org.springframework.ai.tool.ToolCallback> toolCallbacks, @Nullable Map<String, Object> toolContext, @Nullable Integer candidateCount, @Nullable String responseMimeType, @Nullable String responseSchema, @Nullable Integer thinkingBudget, @Nullable Boolean includeThoughts, @Nullable GoogleGenAiThinkingLevel thinkingLevel, @Nullable Boolean includeExtendedUsageMetadata, @Nullable String cachedContentName, @Nullable Boolean useCachedContent, @Nullable Integer autoCacheThreshold, @Nullable Duration autoCacheTtl, @Nullable Boolean googleSearchRetrieval, @Nullable Boolean includeServerSideToolInvocations, @Nullable List<GoogleGenAiSafetySetting> safetySettings, @Nullable Map<String, String> labels, @Nullable GoogleGenAiServiceTier serviceTier) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()boolean@Nullable Integer@Nullable Duration@Nullable String@Nullable Integer@Nullable Double@Nullable Boolean@Nullable Boolean@Nullable Boolean@Nullable Boolean@Nullable Integer@Nullable IntegergetModel()@Nullable String@Nullable Double@Nullable String@Nullable String@Nullable List<GoogleGenAiSafetySetting>@Nullable GoogleGenAiServiceTier@Nullable Integer@Nullable GoogleGenAiThinkingLevel@Nullable List<org.springframework.ai.tool.ToolCallback>@Nullable GoogleGenAiChatOptions.ToolChoiceReturns the tool choice configuration.@Nullable IntegergetTopK()getTopP()@Nullable BooleaninthashCode()mutate()
-
Constructor Details
-
GoogleGenAiChatOptions
protected GoogleGenAiChatOptions(@Nullable String model, @Nullable Double frequencyPenalty, @Nullable Integer maxOutputTokens, @Nullable Double presencePenalty, @Nullable List<String> stopSequences, @Nullable Double temperature, @Nullable Integer topK, @Nullable Double topP, @Nullable GoogleGenAiChatOptions.ToolChoice toolChoice, @Nullable List<org.springframework.ai.tool.ToolCallback> toolCallbacks, @Nullable Map<String, Object> toolContext, @Nullable Integer candidateCount, @Nullable String responseMimeType, @Nullable String responseSchema, @Nullable Integer thinkingBudget, @Nullable Boolean includeThoughts, @Nullable GoogleGenAiThinkingLevel thinkingLevel, @Nullable Boolean includeExtendedUsageMetadata, @Nullable String cachedContentName, @Nullable Boolean useCachedContent, @Nullable Integer autoCacheThreshold, @Nullable Duration autoCacheTtl, @Nullable Boolean googleSearchRetrieval, @Nullable Boolean includeServerSideToolInvocations, @Nullable List<GoogleGenAiSafetySetting> safetySettings, @Nullable Map<String, String> labels, @Nullable GoogleGenAiServiceTier serviceTier)
-
-
Method Details
-
builder
-
getStopSequences
- Specified by:
getStopSequencesin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getTemperature
- Specified by:
getTemperaturein interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getTopP
- Specified by:
getTopPin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getTopK
- Specified by:
getTopKin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getToolChoice
Returns the tool choice configuration.- Returns:
- the tool choice, or
nullif not set - Since:
- 2.0.1
-
getCandidateCount
-
getMaxTokens
- Specified by:
getMaxTokensin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getMaxOutputTokens
-
getModel
- Specified by:
getModelin interfaceorg.springframework.ai.chat.prompt.ChatOptions
-
getResponseMimeType
-
getResponseSchema
-
getToolCallbacks
- Specified by:
getToolCallbacksin 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
-
getThinkingBudget
-
getIncludeThoughts
-
getThinkingLevel
-
getIncludeExtendedUsageMetadata
-
getCachedContentName
-
getUseCachedContent
-
getAutoCacheThreshold
-
getAutoCacheTtl
-
getGoogleSearchRetrieval
-
getIncludeServerSideToolInvocations
-
getSafetySettings
-
getLabels
-
getServiceTier
- Since:
- 2.0.0
-
getToolContext
- Specified by:
getToolContextin interfaceorg.springframework.ai.model.tool.ToolCallingChatOptions
-
getOutputSchema
- Specified by:
getOutputSchemain interfaceorg.springframework.ai.model.tool.StructuredOutputChatOptions
-
equals
-
hashCode
public int hashCode() -
mutate
- Specified by:
mutatein interfaceorg.springframework.ai.chat.prompt.ChatOptions- Specified by:
mutatein interfaceorg.springframework.ai.model.tool.StructuredOutputChatOptions- Specified by:
mutatein interfaceorg.springframework.ai.model.tool.ToolCallingChatOptions
-