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
  • Constructor Details

    • GoogleGenAiChatOptions

      public GoogleGenAiChatOptions()
  • Method Details

    • builder

      public static GoogleGenAiChatOptions.Builder builder()
    • fromOptions

      public static GoogleGenAiChatOptions fromOptions(GoogleGenAiChatOptions fromOptions)
    • getStopSequences

      public List<String> getStopSequences()
      Specified by:
      getStopSequences in interface org.springframework.ai.chat.prompt.ChatOptions
    • setStopSequences

      public void setStopSequences(List<String> stopSequences)
    • getTemperature

      public Double getTemperature()
      Specified by:
      getTemperature in interface org.springframework.ai.chat.prompt.ChatOptions
    • setTemperature

      public void setTemperature(Double temperature)
    • getTopP

      public Double getTopP()
      Specified by:
      getTopP in interface org.springframework.ai.chat.prompt.ChatOptions
    • setTopP

      public void setTopP(Double topP)
    • getTopK

      public Integer getTopK()
      Specified by:
      getTopK in interface org.springframework.ai.chat.prompt.ChatOptions
    • setTopK

      public void setTopK(Integer topK)
    • getCandidateCount

      public Integer getCandidateCount()
    • setCandidateCount

      public void setCandidateCount(Integer candidateCount)
    • getMaxTokens

      public Integer getMaxTokens()
      Specified by:
      getMaxTokens in interface org.springframework.ai.chat.prompt.ChatOptions
    • setMaxTokens

      public void setMaxTokens(Integer maxTokens)
    • getMaxOutputTokens

      public Integer getMaxOutputTokens()
    • setMaxOutputTokens

      public void setMaxOutputTokens(Integer maxOutputTokens)
    • getModel

      public String getModel()
      Specified by:
      getModel in interface org.springframework.ai.chat.prompt.ChatOptions
    • setModel

      public void setModel(String modelName)
    • getResponseMimeType

      public String getResponseMimeType()
    • setResponseMimeType

      public void setResponseMimeType(String mimeType)
    • getResponseSchema

      public String getResponseSchema()
    • setResponseSchema

      public void setResponseSchema(String responseSchema)
    • getToolCallbacks

      public List<org.springframework.ai.tool.ToolCallback> getToolCallbacks()
      Specified by:
      getToolCallbacks in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • setToolCallbacks

      public void setToolCallbacks(List<org.springframework.ai.tool.ToolCallback> toolCallbacks)
      Specified by:
      setToolCallbacks in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • getToolNames

      public Set<String> getToolNames()
      Specified by:
      getToolNames in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • setToolNames

      public void setToolNames(Set<String> toolNames)
      Specified by:
      setToolNames in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • getInternalToolExecutionEnabled

      @Nullable public Boolean getInternalToolExecutionEnabled()
      Specified by:
      getInternalToolExecutionEnabled in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • setInternalToolExecutionEnabled

      public void setInternalToolExecutionEnabled(@Nullable Boolean internalToolExecutionEnabled)
      Specified by:
      setInternalToolExecutionEnabled in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • getFrequencyPenalty

      public Double getFrequencyPenalty()
      Specified by:
      getFrequencyPenalty in interface org.springframework.ai.chat.prompt.ChatOptions
    • getPresencePenalty

      public Double getPresencePenalty()
      Specified by:
      getPresencePenalty in interface org.springframework.ai.chat.prompt.ChatOptions
    • setFrequencyPenalty

      public void setFrequencyPenalty(Double frequencyPenalty)
    • setPresencePenalty

      public void setPresencePenalty(Double presencePenalty)
    • getThinkingBudget

      public Integer getThinkingBudget()
    • setThinkingBudget

      public void setThinkingBudget(Integer thinkingBudget)
    • getIncludeThoughts

      public Boolean getIncludeThoughts()
    • setIncludeThoughts

      public void setIncludeThoughts(Boolean includeThoughts)
    • getThinkingLevel

      public GoogleGenAiThinkingLevel getThinkingLevel()
    • setThinkingLevel

      public void setThinkingLevel(GoogleGenAiThinkingLevel thinkingLevel)
    • getIncludeExtendedUsageMetadata

      public Boolean getIncludeExtendedUsageMetadata()
    • setIncludeExtendedUsageMetadata

      public void setIncludeExtendedUsageMetadata(Boolean includeExtendedUsageMetadata)
    • getCachedContentName

      public String getCachedContentName()
    • setCachedContentName

      public void setCachedContentName(String cachedContentName)
    • getUseCachedContent

      public Boolean getUseCachedContent()
    • setUseCachedContent

      public void setUseCachedContent(Boolean useCachedContent)
    • getAutoCacheThreshold

      public Integer getAutoCacheThreshold()
    • setAutoCacheThreshold

      public void setAutoCacheThreshold(Integer autoCacheThreshold)
    • getAutoCacheTtl

      public Duration getAutoCacheTtl()
    • setAutoCacheTtl

      public void setAutoCacheTtl(Duration autoCacheTtl)
    • getGoogleSearchRetrieval

      public Boolean getGoogleSearchRetrieval()
    • setGoogleSearchRetrieval

      public void setGoogleSearchRetrieval(Boolean googleSearchRetrieval)
    • getSafetySettings

      public List<GoogleGenAiSafetySetting> getSafetySettings()
    • setSafetySettings

      public void setSafetySettings(List<GoogleGenAiSafetySetting> safetySettings)
    • getLabels

      public Map<String,String> getLabels()
    • setLabels

      public void setLabels(Map<String,String> labels)
    • getToolContext

      public Map<String,Object> getToolContext()
      Specified by:
      getToolContext in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • setToolContext

      public void setToolContext(Map<String,Object> toolContext)
      Specified by:
      setToolContext in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • getOutputSchema

      public String getOutputSchema()
      Specified by:
      getOutputSchema in interface org.springframework.ai.model.tool.StructuredOutputChatOptions
    • setOutputSchema

      public void setOutputSchema(String jsonSchemaText)
      Specified by:
      setOutputSchema in interface org.springframework.ai.model.tool.StructuredOutputChatOptions
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • copy

      public GoogleGenAiChatOptions copy()
      Specified by:
      copy in interface org.springframework.ai.chat.prompt.ChatOptions