ApprovalRequiredAIFunction class
An AIFunction that is marked as requiring user approval before invocation.
This class augments an AIFunction with an indicator that approval must be obtained before the function is called. Enforcement of the approval requirement is the responsibility of the invoker (e.g. FunctionInvokingChatClient).
- Inheritance
-
- Object
- AITool
- AIFunctionDeclaration
- AIFunction
- DelegatingAIFunction
- ApprovalRequiredAIFunction
- Annotations
-
- @Source(name: 'ApprovalRequiredAIFunction.cs', namespace: 'Microsoft.Extensions.AI', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Abstractions/Functions/')
Constructors
- ApprovalRequiredAIFunction(AIFunction innerFunction)
-
Creates a new ApprovalRequiredAIFunction wrapping
innerFunction.
Properties
- additionalProperties ↔ AdditionalPropertiesDictionary?
-
Additional properties.
getter/setter pairinherited
- description → String?
-
A description of the tool.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerFunction → AIFunction
-
The inner function to delegate to.
finalinherited
- isStrict → bool?
-
Whether the function requires strict schema adherence.
finalinherited
- name → String
-
The name of the tool.
finalinherited
-
parametersSchema
→ Map<
String, dynamic> ? -
The JSON schema describing the function's input parameters.
finalinherited
-
returnSchema
→ Map<
String, dynamic> ? -
The JSON schema describing the function's return value.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getService<
T> ({Object? key}) → T? -
Gets a service of the specified type.
inherited
-
invoke(
AIFunctionArguments? arguments, {CancellationToken? cancellationToken}) → Future< Object?> -
Invokes the function with the given
arguments.inherited -
invokeCore(
AIFunctionArguments arguments, {CancellationToken? cancellationToken}) → Future< Object?> -
Core implementation of function invocation.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited