Class VertexAiGeminiChatOptions

java.lang.Object
org.springframework.ai.vertexai.gemini.VertexAiGeminiChatOptions
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 VertexAiGeminiChatOptions extends Object implements org.springframework.ai.model.tool.ToolCallingChatOptions, org.springframework.ai.model.tool.StructuredOutputChatOptions
Options for the Vertex AI Gemini Chat API.
Since:
1.0.0
Author:
Christian Tzolov, Thomas Vitale, Grogdunn, Ilayaperumal Gopinathan, Soby Chacko
  • Constructor Details

    • VertexAiGeminiChatOptions

      public VertexAiGeminiChatOptions()
  • Method Details

    • builder

      public static VertexAiGeminiChatOptions.Builder builder()
    • fromOptions

      public static VertexAiGeminiChatOptions fromOptions(VertexAiGeminiChatOptions 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)
    • setResponseLogprobs

      public void setResponseLogprobs(boolean responseLogprobs)
    • 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)
    • getSeed

      public Integer getSeed()
    • setSeed

      public void setSeed(Integer seed)
    • 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)
    • getGoogleSearchRetrieval

      public Boolean getGoogleSearchRetrieval()
    • setGoogleSearchRetrieval

      public void setGoogleSearchRetrieval(Boolean googleSearchRetrieval)
    • getSafetySettings

      public List<VertexAiGeminiSafetySetting> getSafetySettings()
    • setSafetySettings

      public void setSafetySettings(List<VertexAiGeminiSafetySetting> safetySettings)
    • 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
    • getLogprobs

      public Integer getLogprobs()
    • setLogprobs

      public void setLogprobs(Integer logprobs)
    • getResponseLogprobs

      public boolean getResponseLogprobs()
    • 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

      Specified by:
      copy in interface org.springframework.ai.chat.prompt.ChatOptions