diff --git a/src/Infrastructure/BotSharp.Core/Functions/GetLocationFn.cs b/src/Infrastructure/BotSharp.Core/Functions/GetLocationFn.cs deleted file mode 100644 index cabfbdbb..00000000 --- a/src/Infrastructure/BotSharp.Core/Functions/GetLocationFn.cs +++ /dev/null @@ -1,25 +0,0 @@ -using BotSharp.Abstraction.Functions; -using BotSharp.Abstraction.Options; - -namespace BotSharp.Core.Functions; - -public class GetLocationFn : IFunctionCallback -{ - private readonly IServiceProvider _services; - - public GetLocationFn(IServiceProvider services) - { - _services = services; - } - - public string Name => "get_location"; - public string Indication => "Finding location"; - - public async Task Execute(RoleDialogModel message) - { - var args = JsonSerializer.Deserialize(message.FunctionArgs, BotSharpOptions.defaultJsonOptions); - - message.Content = $"There are a lot of fun events here in {args.City}"; - return true; - } -} diff --git a/src/Infrastructure/BotSharp.Core/Functions/GetWeatherFn.cs b/src/Infrastructure/BotSharp.Core/Functions/GetWeatherFn.cs index 09f6e661..d203ac8c 100644 --- a/src/Infrastructure/BotSharp.Core/Functions/GetWeatherFn.cs +++ b/src/Infrastructure/BotSharp.Core/Functions/GetWeatherFn.cs @@ -1,7 +1,4 @@ using BotSharp.Abstraction.Functions; -using BotSharp.Abstraction.Models; -using BotSharp.Abstraction.Options; -using BotSharp.Abstraction.SideCar; using System.Text.Json.Serialization; namespace BotSharp.Core.Functions; @@ -21,24 +18,9 @@ public class GetWeatherFn : IFunctionCallback public async Task Execute(RoleDialogModel message) { //var args = JsonSerializer.Deserialize(message.FunctionArgs, BotSharpOptions.defaultJsonOptions); - - //var sidecar = _services.GetService(); - //var states = GetSideCarStates(); - - //var userMessage = $"Please find the information at location {args.City}, {args.State}"; - //var response = await sidecar.SendMessage(BuiltInAgentId.Chatbot, userMessage, states: states); message.Content = $"It is a sunny day."; return true; } - - private List GetSideCarStates() - { - var sideCarStates = new List() - { - new("channel", "email") - }; - return sideCarStates; - } } class Location diff --git a/src/Plugins/BotSharp.Plugin.GoogleAI/Providers/Realtime/RealTimeCompletionProvider.cs b/src/Plugins/BotSharp.Plugin.GoogleAI/Providers/Realtime/RealTimeCompletionProvider.cs index f8f551fe..eb6f4e76 100644 --- a/src/Plugins/BotSharp.Plugin.GoogleAI/Providers/Realtime/RealTimeCompletionProvider.cs +++ b/src/Plugins/BotSharp.Plugin.GoogleAI/Providers/Realtime/RealTimeCompletionProvider.cs @@ -273,13 +273,10 @@ public class GoogleRealTimeProvider : IRealTimeCompletion public async Task UpdateSession(RealtimeHubConnection conn, bool isInit = false) { - var convService = _services.GetRequiredService(); var agentService = _services.GetRequiredService(); var realtimeSetting = _services.GetRequiredService(); - var conv = await convService.GetConversation(conn.ConversationId); var agent = await agentService.LoadAgent(conn.CurrentAgentId); - var (prompt, request) = PrepareOptions(agent, []); var config = request.GenerationConfig;