Partager via


OpenAIPluginCollectionExtensions.TryGetFunctionAndArguments Method

Definition

Overloads

TryGetFunctionAndArguments(IReadOnlyKernelPluginCollection, OpenAIFunctionToolCall, KernelFunction, KernelArguments)

Given an OpenAIFunctionToolCall object, tries to retrieve the corresponding KernelFunction and populate KernelArguments with its parameters.

TryGetFunctionAndArguments(IReadOnlyKernelPluginCollection, ChatToolCall, KernelFunction, KernelArguments)

Given an OpenAIFunctionToolCall object, tries to retrieve the corresponding KernelFunction and populate KernelArguments with its parameters.

TryGetFunctionAndArguments(IReadOnlyKernelPluginCollection, OpenAIFunctionToolCall, KernelFunction, KernelArguments)

Given an OpenAIFunctionToolCall object, tries to retrieve the corresponding KernelFunction and populate KernelArguments with its parameters.

public static bool TryGetFunctionAndArguments (this Microsoft.SemanticKernel.IReadOnlyKernelPluginCollection plugins, Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFunctionToolCall functionToolCall, out Microsoft.SemanticKernel.KernelFunction? function, out Microsoft.SemanticKernel.KernelArguments? arguments);
static member TryGetFunctionAndArguments : Microsoft.SemanticKernel.IReadOnlyKernelPluginCollection * Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFunctionToolCall * KernelFunction * KernelArguments -> bool
<Extension()>
Public Function TryGetFunctionAndArguments (plugins As IReadOnlyKernelPluginCollection, functionToolCall As OpenAIFunctionToolCall, ByRef function As KernelFunction, ByRef arguments As KernelArguments) As Boolean

Parameters

plugins
IReadOnlyKernelPluginCollection

The plugins.

functionToolCall
OpenAIFunctionToolCall

The OpenAIFunctionToolCall object.

function
KernelFunction

When this method returns, the function that was retrieved if one with the specified name was found; otherwise, null

arguments
KernelArguments

When this method returns, the arguments for the function; otherwise, null

Returns

true if the function was found; otherwise, false.

Applies to

TryGetFunctionAndArguments(IReadOnlyKernelPluginCollection, ChatToolCall, KernelFunction, KernelArguments)

Given an OpenAIFunctionToolCall object, tries to retrieve the corresponding KernelFunction and populate KernelArguments with its parameters.

public static bool TryGetFunctionAndArguments (this Microsoft.SemanticKernel.IReadOnlyKernelPluginCollection plugins, OpenAI.Chat.ChatToolCall functionToolCall, out Microsoft.SemanticKernel.KernelFunction? function, out Microsoft.SemanticKernel.KernelArguments? arguments);
static member TryGetFunctionAndArguments : Microsoft.SemanticKernel.IReadOnlyKernelPluginCollection * OpenAI.Chat.ChatToolCall * KernelFunction * KernelArguments -> bool
<Extension()>
Public Function TryGetFunctionAndArguments (plugins As IReadOnlyKernelPluginCollection, functionToolCall As ChatToolCall, ByRef function As KernelFunction, ByRef arguments As KernelArguments) As Boolean

Parameters

plugins
IReadOnlyKernelPluginCollection

The plugins.

functionToolCall
OpenAI.Chat.ChatToolCall

The OpenAIFunctionToolCall object.

function
KernelFunction

When this method returns, the function that was retrieved if one with the specified name was found; otherwise, null

arguments
KernelArguments

When this method returns, the arguments for the function; otherwise, null

Returns

true if the function was found; otherwise, false.

Applies to