ToolApprovalMiddleware class
Properties
-
approvedTools
→ List<String>
-
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
tools
→ List<Tool>?
-
Middleware can act as a "kit" by providing tools directly.
These tools will be added to the tool list of the
generate call.
no setterinherited
Methods
-
generate(GenerateActionOptions options, ActionFnArg<ModelResponseChunk, GenerateActionOptions, void> ctx, Future<GenerateResponseHelper> next(GenerateActionOptions options, ActionFnArg<ModelResponseChunk, GenerateActionOptions, void> ctx))
→ Future<GenerateResponseHelper>
-
Middleware for the top-level generate call.
-
model(ModelRequest request, ActionFnArg<ModelResponseChunk, ModelRequest, void> ctx, Future<ModelResponse> next(ModelRequest request, ActionFnArg<ModelResponseChunk, ModelRequest, void> ctx))
→ Future<ModelResponse>
-
Middleware for the raw model call.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
tool(ToolRequest request, ActionFnArg<void, dynamic, void> ctx, Future<ToolResponse> next(ToolRequest request, ActionFnArg<void, dynamic, void> ctx))
→ Future<ToolResponse>
-
Middleware for tool execution.
-
toString()
→ String
-
A string representation of this object.
inherited