Class ChatOptions<S>

java.lang.Object
com.google.genkit.ai.session.ChatOptions<S>
Type Parameters:
S - the type of the session state

public class ChatOptions<S> extends Object
ChatOptions provides configuration options for creating a Chat instance.
  • Constructor Details

    • ChatOptions

      public ChatOptions()
      Default constructor.
  • Method Details

    • getModel

      public String getModel()
      Gets the model name.
      Returns:
      the model name
    • setModel

      public void setModel(String model)
      Sets the model name.
      Parameters:
      model - the model name
    • getSystem

      public String getSystem()
      Gets the system prompt.
      Returns:
      the system prompt
    • setSystem

      public void setSystem(String system)
      Sets the system prompt.
      Parameters:
      system - the system prompt
    • getTools

      public List<Tool<?,?>> getTools()
      Gets the available tools.
      Returns:
      the tools
    • setTools

      public void setTools(List<Tool<?,?>> tools)
      Sets the available tools.
      Parameters:
      tools - the tools
    • getOutput

      public OutputConfig getOutput()
      Gets the output configuration.
      Returns:
      the output configuration
    • setOutput

      public void setOutput(OutputConfig output)
      Sets the output configuration.
      Parameters:
      output - the output configuration
    • getConfig

      public GenerationConfig getConfig()
      Gets the generation configuration.
      Returns:
      the generation configuration
    • setConfig

      public void setConfig(GenerationConfig config)
      Sets the generation configuration.
      Parameters:
      config - the generation configuration
    • getContext

      public Map<String,Object> getContext()
      Gets the additional context.
      Returns:
      the context
    • setContext

      public void setContext(Map<String,Object> context)
      Sets the additional context.
      Parameters:
      context - the context
    • getMaxTurns

      public Integer getMaxTurns()
      Gets the maximum conversation turns.
      Returns:
      the max turns
    • setMaxTurns

      public void setMaxTurns(Integer maxTurns)
      Sets the maximum conversation turns.
      Parameters:
      maxTurns - the max turns
    • getAgentRegistry

      public Map<String,Agent> getAgentRegistry()
      Gets the agent registry for multi-agent handoffs.
      Returns:
      the agent registry
    • setAgentRegistry

      public void setAgentRegistry(Map<String,Agent> agentRegistry)
      Sets the agent registry for multi-agent handoffs.
      Parameters:
      agentRegistry - the agent registry
    • builder

      public static <S> ChatOptions.Builder<S> builder()
      Creates a builder for ChatOptions.
      Type Parameters:
      S - the state type
      Returns:
      a new builder