GenericFunctionToolCallAsync Method

Executes the specified FunctionCall asynchronously and retrieves the resulting FunctionResponse containing any output from the function execution.

Definition

Namespace: GenerativeAI.Tools
Assembly: GenerativeAI.Tools (in GenerativeAI.Tools.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public Task<FunctionResponse?> CallAsync(
	FunctionCall functionCall,
	CancellationToken cancellationToken = default
)

Parameters

functionCall  FunctionCall
The FunctionCall instance containing the name and arguments required for the function execution.
cancellationToken  CancellationToken  (Optional)

[Missing <param name="cancellationToken"/> documentation for "M:GenerativeAI.Tools.GenericFunctionTool.CallAsync(GenerativeAI.Types.FunctionCall,System.Threading.CancellationToken)"]

Return Value

TaskFunctionResponse
A task representing the asynchronous operation, which, upon completion, provides a FunctionResponse with the execution results.

Implements

IFunctionToolCallAsync(FunctionCall, CancellationToken)

See Also