Class GoogleGenAiChatOptions.AbstractBuilder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>

java.lang.Object
org.springframework.ai.chat.prompt.DefaultChatOptionsBuilder<B>
org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B>
org.springframework.ai.google.genai.GoogleGenAiChatOptions.AbstractBuilder<B>
All Implemented Interfaces:
Cloneable, org.springframework.ai.chat.prompt.ChatOptions.Builder<B>, org.springframework.ai.model.tool.StructuredOutputChatOptions.Builder<B>, org.springframework.ai.model.tool.ToolCallingChatOptions.Builder<B>
Direct Known Subclasses:
GoogleGenAiChatOptions.Builder
Enclosing class:
GoogleGenAiChatOptions

protected abstract static class GoogleGenAiChatOptions.AbstractBuilder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>> extends org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B> implements org.springframework.ai.model.tool.StructuredOutputChatOptions.Builder<B>
  • Field Details

    • toolChoice

      protected @Nullable GoogleGenAiChatOptions.ToolChoice toolChoice
    • candidateCount

      protected @Nullable Integer candidateCount
    • responseMimeType

      protected @Nullable String responseMimeType
    • responseSchema

      protected @Nullable String responseSchema
    • thinkingBudget

      protected @Nullable Integer thinkingBudget
    • includeThoughts

      protected @Nullable Boolean includeThoughts
    • thinkingLevel

      protected @Nullable GoogleGenAiThinkingLevel thinkingLevel
    • includeExtendedUsageMetadata

      protected @Nullable Boolean includeExtendedUsageMetadata
    • cachedContentName

      protected @Nullable String cachedContentName
    • useCachedContent

      protected @Nullable Boolean useCachedContent
    • autoCacheThreshold

      protected @Nullable Integer autoCacheThreshold
    • autoCacheTtl

      protected @Nullable Duration autoCacheTtl
    • googleSearchRetrieval

      protected @Nullable Boolean googleSearchRetrieval
    • includeServerSideToolInvocations

      protected @Nullable Boolean includeServerSideToolInvocations
    • safetySettings

      protected @Nullable List<GoogleGenAiSafetySetting> safetySettings
    • labels

      protected @Nullable Map<String,String> labels
    • serviceTier

      protected @Nullable GoogleGenAiServiceTier serviceTier
  • Constructor Details

    • AbstractBuilder

      protected AbstractBuilder()
  • Method Details

    • clone

      public B clone()
      Specified by:
      clone in interface org.springframework.ai.chat.prompt.ChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>
      Overrides:
      clone in class org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>
    • toolChoice

      public B toolChoice(@Nullable GoogleGenAiChatOptions.ToolChoice toolChoice)
      Since:
      2.0.1
    • candidateCount

      public B candidateCount(@Nullable Integer candidateCount)
    • maxOutputTokens

      public B maxOutputTokens(@Nullable Integer maxOutputTokens)
    • model

      public B model(@Nullable GoogleGenAiChatModel.ChatModel model)
    • responseMimeType

      public B responseMimeType(@Nullable String mimeType)
    • responseSchema

      public B responseSchema(@Nullable String responseSchema)
    • outputSchema

      public B outputSchema(@Nullable String jsonSchema)
      Specified by:
      outputSchema in interface org.springframework.ai.model.tool.StructuredOutputChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>
    • googleSearchRetrieval

      public B googleSearchRetrieval(@Nullable Boolean googleSearch)
    • includeServerSideToolInvocations

      public B includeServerSideToolInvocations(@Nullable Boolean includeServerSideToolInvocations)
    • safetySettings

      public B safetySettings(@Nullable List<GoogleGenAiSafetySetting> safetySettings)
    • thinkingBudget

      public B thinkingBudget(@Nullable Integer thinkingBudget)
    • includeThoughts

      public B includeThoughts(@Nullable Boolean includeThoughts)
    • thinkingLevel

      public B thinkingLevel(@Nullable GoogleGenAiThinkingLevel thinkingLevel)
    • includeExtendedUsageMetadata

      public B includeExtendedUsageMetadata(@Nullable Boolean includeExtendedUsageMetadata)
    • labels

      public B labels(@Nullable Map<String,String> labels)
    • cachedContentName

      public B cachedContentName(@Nullable String cachedContentName)
    • useCachedContent

      public B useCachedContent(@Nullable Boolean useCachedContent)
    • autoCacheThreshold

      public B autoCacheThreshold(@Nullable Integer autoCacheThreshold)
    • autoCacheTtl

      public B autoCacheTtl(@Nullable Duration autoCacheTtl)
    • serviceTier

      public B serviceTier(@Nullable GoogleGenAiServiceTier serviceTier)
      Since:
      2.0.0
    • combineWith

      public B combineWith(org.springframework.ai.chat.prompt.ChatOptions.Builder<?> other)
      Specified by:
      combineWith in interface org.springframework.ai.chat.prompt.ChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>
      Overrides:
      combineWith in class org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>
    • build

      public GoogleGenAiChatOptions build()
      Specified by:
      build in interface org.springframework.ai.chat.prompt.ChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>
      Specified by:
      build in interface org.springframework.ai.model.tool.ToolCallingChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>
      Overrides:
      build in class org.springframework.ai.model.tool.DefaultToolCallingChatOptions.Builder<B extends GoogleGenAiChatOptions.AbstractBuilder<B>>