Package com.google.genkit.ai.session
Class ChatOptions<S>
java.lang.Object
com.google.genkit.ai.session.ChatOptions<S>
- Type Parameters:
S- the type of the session state
ChatOptions provides configuration options for creating a Chat instance.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> ChatOptions.Builder<S> builder()Creates a builder for ChatOptions.Gets the agent registry for multi-agent handoffs.Gets the generation configuration.Gets the additional context.Gets the maximum conversation turns.getModel()Gets the model name.Gets the output configuration.Gets the system prompt.getTools()Gets the available tools.voidsetAgentRegistry(Map<String, Agent> agentRegistry) Sets the agent registry for multi-agent handoffs.voidsetConfig(GenerationConfig config) Sets the generation configuration.voidsetContext(Map<String, Object> context) Sets the additional context.voidsetMaxTurns(Integer maxTurns) Sets the maximum conversation turns.voidSets the model name.voidsetOutput(OutputConfig output) Sets the output configuration.voidSets the system prompt.voidSets the available tools.
-
Constructor Details
-
ChatOptions
public ChatOptions()Default constructor.
-
-
Method Details
-
getModel
Gets the model name.- Returns:
- the model name
-
setModel
Sets the model name.- Parameters:
model- the model name
-
getSystem
Gets the system prompt.- Returns:
- the system prompt
-
setSystem
Sets the system prompt.- Parameters:
system- the system prompt
-
getTools
Gets the available tools.- Returns:
- the tools
-
setTools
Sets the available tools.- Parameters:
tools- the tools
-
getOutput
Gets the output configuration.- Returns:
- the output configuration
-
setOutput
Sets the output configuration.- Parameters:
output- the output configuration
-
getConfig
Gets the generation configuration.- Returns:
- the generation configuration
-
setConfig
Sets the generation configuration.- Parameters:
config- the generation configuration
-
getContext
Gets the additional context.- Returns:
- the context
-
setContext
Sets the additional context.- Parameters:
context- the context
-
getMaxTurns
Gets the maximum conversation turns.- Returns:
- the max turns
-
setMaxTurns
Sets the maximum conversation turns.- Parameters:
maxTurns- the max turns
-
getAgentRegistry
Gets the agent registry for multi-agent handoffs.- Returns:
- the agent registry
-
setAgentRegistry
Sets the agent registry for multi-agent handoffs.- Parameters:
agentRegistry- the agent registry
-
builder
Creates a builder for ChatOptions.- Type Parameters:
S- the state type- Returns:
- a new builder
-