Class ToolAttributes.Builder
java.lang.Object
com.oracle.database.selectai.model.agent.ToolAttributes.Builder
- Enclosing class:
ToolAttributes
Builder for
ToolAttributes.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds immutable tool attributes.Sets the custom PL/SQL function or procedure name.instruction(String instruction) Sets the tool instruction.toolInputs(List<ToolInput> toolInputs) Copies tool input metadata into an immutable list.toolParams(ToolParams toolParams) Snapshots typed built-in tool parameters.Sets a known or database-defined tool type.toolTypeValue(String toolType) Sets a tool type directly from its database value.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instruction
Sets the tool instruction.- Parameters:
instruction- tool instruction- Returns:
- this builder
- See Also:
-
function
Sets the custom PL/SQL function or procedure name.- Parameters:
functionName- function or procedure name- Returns:
- this builder
- See Also:
-
toolType
Sets a known or database-defined tool type.- Parameters:
toolType- tool type value object- Returns:
- this builder
- See Also:
-
toolTypeValue
Sets a tool type directly from its database value.- Parameters:
toolType- database tool type value- Returns:
- this builder
- Throws:
IllegalArgumentException- whentoolTypeis blank- See Also:
-
toolParams
Snapshots typed built-in tool parameters. Use a tool-specific builder for known fields orGenericToolParamsfor an extensible parameter object. Required fields are validated by the database.- Parameters:
toolParams- tool parameters, or null to omit them- Returns:
- this builder
- Throws:
IllegalArgumentException- when the value is not JSON-compatible- See Also:
-
toolInputs
Copies tool input metadata into an immutable list. Each entry supplies a name and optional description; the database validates their meaning. An empty list is serialized as an emptytool_inputsarray.- Parameters:
toolInputs- input metadata, ornullto omit it- Returns:
- this builder
- Throws:
IllegalArgumentException- when the list contains a null entry- See Also:
-
build
Builds immutable tool attributes.- Returns:
- immutable tool attributes
- See Also:
-