mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
32b984b09b
* add extensions to register tools via fluentAPI * fix
18 lines
424 B
C#
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);
|
|
}
|
|
}
|