Files
agent-framework/dotnet/samples/AgentWebChat/AgentWebChat.AgentHost/Custom/CustomAITools.cs
T
Korolev Dmitry 32b984b09b .NET: Add WithAITool extensions for Hosting AIAgents (#1990)
* add extensions to register tools via fluentAPI

* fix
2025-11-07 16:28:28 +00:00

18 lines
424 B
C#

// Copyright (c) Microsoft. All rights reserved.
using Microsoft.Extensions.AI;
namespace AgentWebChat.AgentHost.Custom;
public class CustomAITool : AITool
{
}
public class CustomFunctionTool : AIFunction
{
protected override ValueTask<object?> InvokeCoreAsync(AIFunctionArguments arguments, CancellationToken cancellationToken)
{
return new ValueTask<object?>(arguments.Context?.Count ?? 0);
}
}