Package com.google.genkit.ai.session
Class ChatOptions.Builder<S>
java.lang.Object
com.google.genkit.ai.session.ChatOptions.Builder<S>
- Type Parameters:
S- the state type
- Enclosing class:
ChatOptions<S>
Builder for ChatOptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentRegistry(Map<String, Agent> agentRegistry) Sets the agent registry for multi-agent handoffs.build()Builds the ChatOptions.config(GenerationConfig config) Sets the generation configuration.Sets the additional context.Sets the maximum conversation turns.Sets the model name.output(OutputConfig output) Sets the output configuration.Sets the system prompt.Sets the available tools.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
model
Sets the model name.- Parameters:
model- the model name- Returns:
- this builder
-
system
Sets the system prompt.- Parameters:
system- the system prompt- Returns:
- this builder
-
tools
Sets the available tools.- Parameters:
tools- the tools- Returns:
- this builder
-
output
Sets the output configuration.- Parameters:
output- the output configuration- Returns:
- this builder
-
config
Sets the generation configuration.- Parameters:
config- the generation configuration- Returns:
- this builder
-
context
Sets the additional context.- Parameters:
context- the context- Returns:
- this builder
-
maxTurns
Sets the maximum conversation turns.- Parameters:
maxTurns- the max turns- Returns:
- this builder
-
agentRegistry
Sets the agent registry for multi-agent handoffs.- Parameters:
agentRegistry- the agent registry- Returns:
- this builder
-
build
Builds the ChatOptions.- Returns:
- the built ChatOptions
-