ApprovalRequiredAIFunction Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an AIFunction that can be described to an AI service and invoked, but for which the invoker should obtain user approval before the function is actually invoked.
public ref class ApprovalRequiredAIFunction sealed : Microsoft::Extensions::AI::DelegatingAIFunction
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001")]
public sealed class ApprovalRequiredAIFunction : Microsoft.Extensions.AI.DelegatingAIFunction
public sealed class ApprovalRequiredAIFunction : Microsoft.Extensions.AI.DelegatingAIFunction
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001")>]
type ApprovalRequiredAIFunction = class
inherit DelegatingAIFunction
type ApprovalRequiredAIFunction = class
inherit DelegatingAIFunction
Public NotInheritable Class ApprovalRequiredAIFunction
Inherits DelegatingAIFunction
- Inheritance
- Attributes
Remarks
This class simply augments an AIFunction with an indication that approval is required before invocation. It does not enforce the requirement for user approval; it is the responsibility of the invoker to obtain that approval before invoking the function.
Constructors
| ApprovalRequiredAIFunction(AIFunction) |
Initializes a new instance of the ApprovalRequiredAIFunction class. |
Properties
| AdditionalProperties |
Gets any additional properties associated with the tool. (Inherited from DelegatingAIFunction) |
| Description |
Gets a description of the tool, suitable for use in describing the purpose to a model. (Inherited from DelegatingAIFunction) |
| InnerFunction |
Gets the inner AIFunction. (Inherited from DelegatingAIFunction) |
| JsonSchema |
Gets a JSON Schema describing the function and its input parameters. (Inherited from DelegatingAIFunction) |
| JsonSerializerOptions |
Gets a JsonSerializerOptions that can be used to marshal function parameters. (Inherited from DelegatingAIFunction) |
| Name |
Gets the name of the tool. (Inherited from DelegatingAIFunction) |
| ReturnJsonSchema |
Gets a JSON Schema describing the function's return value. (Inherited from DelegatingAIFunction) |
| UnderlyingMethod |
Gets the underlying MethodInfo that this AIFunction might be wrapping. (Inherited from DelegatingAIFunction) |
Methods
| AsDeclarationOnly() |
Creates a AIFunctionDeclaration representation of this AIFunction that can't be invoked. (Inherited from AIFunction) |
| GetService(Type, Object) |
Asks the AITool for an object of the specified type |
| GetService<TService>(Object) |
Asks the AITool for an object of type |
| InvokeAsync(AIFunctionArguments, CancellationToken) |
Invokes the AIFunction and returns its result. (Inherited from AIFunction) |
| InvokeCoreAsync(AIFunctionArguments, CancellationToken) |
Invokes the AIFunction and returns its result. (Inherited from DelegatingAIFunction) |
| ToString() |
Returns a string that represents the current object. (Inherited from DelegatingAIFunction) |
Extension Methods
| AsOpenAIAssistantsFunctionToolDefinition(AIFunctionDeclaration) |
Creates an OpenAI FunctionToolDefinition from an AIFunctionDeclaration. |
| AsOpenAIChatTool(AIFunctionDeclaration) |
Creates an OpenAI ChatTool from an AIFunctionDeclaration. |
| AsOpenAIConversationFunctionTool(AIFunctionDeclaration) |
Creates an OpenAI ConversationFunctionTool from an AIFunctionDeclaration. |
| AsOpenAIResponseTool(AIFunctionDeclaration) |
Creates an OpenAI ResponseTool from an AIFunctionDeclaration. |