OpenAIClientExtensions.AsOpenAIChatTool(AIFunction) Method
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.
Creates an OpenAI ChatTool from an AIFunction.
public:
[System::Runtime::CompilerServices::Extension]
static OpenAI::Chat::ChatTool ^ AsOpenAIChatTool(Microsoft::Extensions::AI::AIFunction ^ function);
public static OpenAI.Chat.ChatTool AsOpenAIChatTool(this Microsoft.Extensions.AI.AIFunction function);
static member AsOpenAIChatTool : Microsoft.Extensions.AI.AIFunction -> OpenAI.Chat.ChatTool
<Extension()>
Public Function AsOpenAIChatTool (function As AIFunction) As ChatTool
Parameters
- function
- AIFunction
The function to convert.
Returns
An OpenAI ChatTool representing function
.
Exceptions
function
is null
.