Partilhar via


ChatCompletionsToolCall.CreateFunctionToolCall(String, String, String) Method

Definition

Creates a new ChatCompletionsToolCall representing a function call made by the model.

public static Azure.AI.Inference.ChatCompletionsToolCall CreateFunctionToolCall (string toolCallId, string functionName, string functionArguments);
static member CreateFunctionToolCall : string * string * string -> Azure.AI.Inference.ChatCompletionsToolCall
Public Shared Function CreateFunctionToolCall (toolCallId As String, functionName As String, functionArguments As String) As ChatCompletionsToolCall

Parameters

toolCallId
String

The ID of the tool call.

functionName
String

The name of the function that model is calling.

functionArguments
String

The arguments that model is calling the function with, which are generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.

Returns

Exceptions

toolCallId, functionName or functionArguments is null.

toolCallId, functionName or functionArguments is an empty string, and was expected to be non-empty.

Applies to