minor change

This commit is contained in:
Jicheng Lu 2025-05-15 23:02:38 -05:00
parent 0c2ba423d8
commit d5d03834f1

View file

@ -1,5 +1,4 @@
using BotSharp.Abstraction.Functions; using BotSharp.Abstraction.Functions;
using System.Text.Json.Serialization;
namespace BotSharp.Core.Demo.Functions; namespace BotSharp.Core.Demo.Functions;
@ -17,15 +16,8 @@ public class GetWeatherFn : IFunctionCallback
public async Task<bool> Execute(RoleDialogModel message) public async Task<bool> Execute(RoleDialogModel message)
{ {
//var args = JsonSerializer.Deserialize<Location>(message.FunctionArgs, BotSharpOptions.defaultJsonOptions); message.Content = $"It is a sunny day!";
message.Content = $"It is a sunny day.";
//message.StopCompletion = true; //message.StopCompletion = true;
return true; return true;
} }
}
class Location
{
[JsonPropertyName("city")]
public string? City { get; set; }
} }