AIChatFunctionCall.Request Property
Returns the name and arguments of an AI-invoked function.
Namespace: DevExpress.AIIntegration.Blazor.Chat
Assembly: DevExpress.AIIntegration.Blazor.Chat.v25.2.dll
NuGet Package: DevExpress.AIIntegration.Blazor.Chat
Declaration
public FunctionCallContent Request { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.Extensions.AI.FunctionCallContent | The function call details. |
Remarks
Access the name/unique identifier and arguments of an AI-invoked function from the MessageContentTemplate context. Refer to the FunctionCallContent class description for details.
The following code snippet appends information about each invoked function to the AI chat response:
@using DevExpress.AIIntegration.Blazor.Chat
@using DevExpress.AIIntegration.Tools
@inject AIToolsContextContainer aiToolsContextContainer
<DxAIChat>
<MessageContentTemplate>
@context.Content
@if(context.FunctionCalls.Count > 0) {
<ul>
@foreach(var functionCall in context.FunctionCalls) {
<li>
Called function: <b>@functionCall.Request.Name</b><br />
Return value: <b>@functionCall.Result.Result.ToString()</b>
</li>
}
</ul>
}
</MessageContentTemplate>
</DxAIChat>
@code {
protected override void OnAfterRender(bool firstRender) {
if(firstRender) {
var context = new AIToolsContextBuilder()
.WithToolMethods(MyAITools.Greet, MyAITools.AddNumbers)
.Build();
aiToolsContextContainer.Add(context);
}
}
}

See Also