Class CountTokensConfig.Builder

java.lang.Object
com.google.genai.types.CountTokensConfig.Builder
Enclosing class:
CountTokensConfig

public abstract static class CountTokensConfig.Builder extends Object
Builder for CountTokensConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • httpOptions

      public abstract CountTokensConfig.Builder httpOptions(HttpOptions httpOptions)
      Setter for httpOptions.

      httpOptions: Used to override HTTP request options.

    • httpOptions

      public CountTokensConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder)
      Setter for httpOptions builder.

      httpOptions: Used to override HTTP request options.

    • systemInstruction

      public abstract CountTokensConfig.Builder systemInstruction(Content systemInstruction)
      Setter for systemInstruction.

      systemInstruction: Instructions for the model to steer it toward better performance.

    • systemInstruction

      public CountTokensConfig.Builder systemInstruction(Content.Builder systemInstructionBuilder)
      Setter for systemInstruction builder.

      systemInstruction: Instructions for the model to steer it toward better performance.

    • tools

      public abstract CountTokensConfig.Builder tools(List<Tool> tools)
      Setter for tools.

      tools: Code that enables the system to interact with external systems to perform an action outside of the knowledge and scope of the model.

    • tools

      public CountTokensConfig.Builder tools(Tool... tools)
      Setter for tools.

      tools: Code that enables the system to interact with external systems to perform an action outside of the knowledge and scope of the model.

    • tools

      public CountTokensConfig.Builder tools(Tool.Builder... toolsBuilders)
      Setter for tools builder.

      tools: Code that enables the system to interact with external systems to perform an action outside of the knowledge and scope of the model.

    • generationConfig

      public abstract CountTokensConfig.Builder generationConfig(GenerationConfig generationConfig)
      Setter for generationConfig.

      generationConfig: Configuration that the model uses to generate the response. Not supported by the Gemini Developer API.

    • generationConfig

      public CountTokensConfig.Builder generationConfig(GenerationConfig.Builder generationConfigBuilder)
      Setter for generationConfig builder.

      generationConfig: Configuration that the model uses to generate the response. Not supported by the Gemini Developer API.

    • build

      public abstract CountTokensConfig build()