IFunctionToolCallAsync Method

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

Definition

Namespace: GenerativeAI.Core
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
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.Core.IFunctionTool.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.

See Also