Package com.google.genkit.ai
Class InterruptConfig.Builder<I,O>
java.lang.Object
com.google.genkit.ai.InterruptConfig.Builder<I,O>
- Enclosing class:
InterruptConfig<I,O>
Builder for InterruptConfig.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the InterruptConfig.description(String description) Sets the description.inputSchema(Map<String, Object> inputSchema) Sets the input schema.Sets the input type class.Sets the interrupt name.outputSchema(Map<String, Object> outputSchema) Sets the output schema.outputType(Class<O> outputType) Sets the output type class.Sets the request metadata function.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the interrupt name.- Parameters:
name- the name- Returns:
- this builder
-
description
Sets the description.- Parameters:
description- the description- Returns:
- this builder
-
inputType
Sets the input type class.- Parameters:
inputType- the input type class- Returns:
- this builder
-
outputType
Sets the output type class.- Parameters:
outputType- the output type class- Returns:
- this builder
-
inputSchema
Sets the input schema.- Parameters:
inputSchema- the input schema- Returns:
- this builder
-
outputSchema
Sets the output schema.- Parameters:
outputSchema- the output schema- Returns:
- this builder
-
requestMetadata
Sets the request metadata function.This function is called with the tool input when the interrupt is triggered, and should return metadata that will be included in the interrupt.
- Parameters:
requestMetadata- function to generate metadata from input- Returns:
- this builder
-
build
Builds the InterruptConfig.- Returns:
- the built config
-