BotSharp/src/Infrastructure/BotSharp.Core/Demo/Functions/GetWeatherFn.cs
2025-05-15 23:02:38 -05:00

23 lines
551 B
C#

using BotSharp.Abstraction.Functions;
namespace BotSharp.Core.Demo.Functions;
public class GetWeatherFn : IFunctionCallback
{
private readonly IServiceProvider _services;
public GetWeatherFn(IServiceProvider services)
{
_services = services;
}
public string Name => "get_weather";
public string Indication => "Querying weather";
public async Task<bool> Execute(RoleDialogModel message)
{
message.Content = $"It is a sunny day!";
//message.StopCompletion = true;
return true;
}
}