diff --git a/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj b/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj index 94c9e27c..697f94a5 100644 --- a/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj +++ b/src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj @@ -1,4 +1,4 @@ - + $(TargetFramework) diff --git a/src/Infrastructure/BotSharp.Abstraction/VectorStorage/Helpers/VectorStorageHelper.cs b/src/Infrastructure/BotSharp.Abstraction/VectorStorage/Extensions/VectorStorageExtension.cs similarity index 90% rename from src/Infrastructure/BotSharp.Abstraction/VectorStorage/Helpers/VectorStorageHelper.cs rename to src/Infrastructure/BotSharp.Abstraction/VectorStorage/Extensions/VectorStorageExtension.cs index f1f0ebde..ec519f04 100644 --- a/src/Infrastructure/BotSharp.Abstraction/VectorStorage/Helpers/VectorStorageHelper.cs +++ b/src/Infrastructure/BotSharp.Abstraction/VectorStorage/Extensions/VectorStorageExtension.cs @@ -1,9 +1,9 @@ using BotSharp.Abstraction.Knowledges.Enums; using BotSharp.Abstraction.VectorStorage.Models; -namespace BotSharp.Abstraction.VectorStorage.Helpers; +namespace BotSharp.Abstraction.VectorStorage.Extensions; -public static class VectorStorageHelper +public static class VectorStorageExtension { public static string ToQuestionAnswer(this VectorSearchResult data) { diff --git a/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj b/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj index 05d485b7..ff10a517 100644 --- a/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj +++ b/src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj @@ -1,4 +1,4 @@ - + $(TargetFramework) diff --git a/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs b/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs index f06e2ba2..05653d9c 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs @@ -6,6 +6,7 @@ using BotSharp.Abstraction.Routing.Planning; using BotSharp.Abstraction.Settings; using BotSharp.Abstraction.Templating; using BotSharp.Core.Instructs; +using BotSharp.Core.Knowledges.Services; using BotSharp.Core.Messaging; using BotSharp.Core.Routing.Planning; using BotSharp.Core.Templating; @@ -54,6 +55,8 @@ public class ConversationPlugin : IBotSharpPlugin services.AddScoped(); services.AddScoped(); services.AddScoped(); + + services.AddScoped(); } public bool AttachMenu(List menu) diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Helpers/KnowledgeSettingHelper.cs b/src/Infrastructure/BotSharp.Core/Knowledges/Helpers/KnowledgeSettingHelper.cs similarity index 89% rename from src/Plugins/BotSharp.Plugin.KnowledgeBase/Helpers/KnowledgeSettingHelper.cs rename to src/Infrastructure/BotSharp.Core/Knowledges/Helpers/KnowledgeSettingHelper.cs index 48033c91..a278d7bf 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Helpers/KnowledgeSettingHelper.cs +++ b/src/Infrastructure/BotSharp.Core/Knowledges/Helpers/KnowledgeSettingHelper.cs @@ -1,4 +1,7 @@ -namespace BotSharp.Plugin.KnowledgeBase.Helpers; +using BotSharp.Abstraction.Knowledges.Settings; +using BotSharp.Abstraction.MLTasks; + +namespace BotSharp.Core.Knowledges.Helpers; public static class KnowledgeSettingHelper { diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Helpers/TextChopper.cs b/src/Infrastructure/BotSharp.Core/Knowledges/Helpers/TextChopper.cs similarity index 94% rename from src/Plugins/BotSharp.Plugin.KnowledgeBase/Helpers/TextChopper.cs rename to src/Infrastructure/BotSharp.Core/Knowledges/Helpers/TextChopper.cs index 9e9b5f9d..68b58539 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Helpers/TextChopper.cs +++ b/src/Infrastructure/BotSharp.Core/Knowledges/Helpers/TextChopper.cs @@ -1,6 +1,7 @@ +using BotSharp.Abstraction.Knowledges.Models; using System.Text.RegularExpressions; -namespace BotSharp.Plugin.KnowledgeBase.Helpers; +namespace BotSharp.Core.Knowledges.Helpers; public static class TextChopper { diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Create.cs b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Create.cs similarity index 92% rename from src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Create.cs rename to src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Create.cs index 2c4004fc..d8b82fb5 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Create.cs +++ b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Create.cs @@ -1,4 +1,8 @@ -namespace BotSharp.Plugin.KnowledgeBase.Services; +using BotSharp.Abstraction.Knowledges.Models; +using BotSharp.Abstraction.VectorStorage.Models; +using BotSharp.Core.Knowledges.Helpers; + +namespace BotSharp.Core.Knowledges.Services; public partial class KnowledgeService { diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Delete.cs b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Delete.cs similarity index 95% rename from src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Delete.cs rename to src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Delete.cs index b0973a99..404b4e2c 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Delete.cs +++ b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Delete.cs @@ -1,4 +1,4 @@ -namespace BotSharp.Plugin.KnowledgeBase.Services; +namespace BotSharp.Core.Knowledges.Services; public partial class KnowledgeService { diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Get.cs b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Get.cs similarity index 96% rename from src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Get.cs rename to src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Get.cs index ee36780e..69093659 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Get.cs +++ b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Get.cs @@ -1,6 +1,8 @@ using BotSharp.Abstraction.Graph.Models; +using BotSharp.Abstraction.Knowledges.Models; +using BotSharp.Abstraction.VectorStorage.Models; -namespace BotSharp.Plugin.KnowledgeBase.Services; +namespace BotSharp.Core.Knowledges.Services; public partial class KnowledgeService { diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Update.cs b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Update.cs similarity index 91% rename from src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Update.cs rename to src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Update.cs index 0fa1f5cd..b9652f61 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.Update.cs +++ b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.Update.cs @@ -1,4 +1,6 @@ -namespace BotSharp.Plugin.KnowledgeBase.Services; +using BotSharp.Abstraction.VectorStorage.Models; + +namespace BotSharp.Core.Knowledges.Services; public partial class KnowledgeService { diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.cs b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.cs similarity index 80% rename from src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.cs rename to src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.cs index c668e07e..2c0853d0 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Services/KnowledgeService.cs +++ b/src/Infrastructure/BotSharp.Core/Knowledges/Services/KnowledgeService.cs @@ -1,4 +1,10 @@ -namespace BotSharp.Plugin.KnowledgeBase.Services; +using BotSharp.Abstraction.Graph; +using BotSharp.Abstraction.Knowledges.Settings; +using BotSharp.Abstraction.MLTasks; +using BotSharp.Abstraction.VectorStorage; +using BotSharp.Core.Knowledges.Helpers; + +namespace BotSharp.Core.Knowledges.Services; public partial class KnowledgeService : IKnowledgeService { diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Functions/KnowledgeRetrievalFn.cs b/src/Plugins/BotSharp.Plugin.KnowledgeBase/Functions/KnowledgeRetrievalFn.cs index a9337419..ffbef770 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Functions/KnowledgeRetrievalFn.cs +++ b/src/Plugins/BotSharp.Plugin.KnowledgeBase/Functions/KnowledgeRetrievalFn.cs @@ -1,4 +1,4 @@ -using BotSharp.Abstraction.VectorStorage.Helpers; +using BotSharp.Abstraction.VectorStorage.Extensions; namespace BotSharp.Plugin.KnowledgeBase.Functions; diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/KnowledgeBasePlugin.cs b/src/Plugins/BotSharp.Plugin.KnowledgeBase/KnowledgeBasePlugin.cs index 75d3284b..ffe4d8f1 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/KnowledgeBasePlugin.cs +++ b/src/Plugins/BotSharp.Plugin.KnowledgeBase/KnowledgeBasePlugin.cs @@ -21,7 +21,6 @@ public class KnowledgeBasePlugin : IBotSharpPlugin return settingService.Bind("KnowledgeBase"); }); - services.AddScoped(); services.AddSingleton(); services.AddScoped(); services.AddScoped(); diff --git a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Using.cs b/src/Plugins/BotSharp.Plugin.KnowledgeBase/Using.cs index a78afefd..1437f41e 100644 --- a/src/Plugins/BotSharp.Plugin.KnowledgeBase/Using.cs +++ b/src/Plugins/BotSharp.Plugin.KnowledgeBase/Using.cs @@ -31,6 +31,5 @@ global using BotSharp.Abstraction.Agents.Enums; global using BotSharp.Abstraction.Agents.Models; global using BotSharp.Abstraction.Functions.Models; global using BotSharp.Abstraction.Repositories; -global using BotSharp.Plugin.KnowledgeBase.Services; global using BotSharp.Plugin.KnowledgeBase.Enum; global using BotSharp.Plugin.KnowledgeBase.Helpers; \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.Planner/Using.cs b/src/Plugins/BotSharp.Plugin.Planner/Using.cs index fa59ee23..1e6737df 100644 --- a/src/Plugins/BotSharp.Plugin.Planner/Using.cs +++ b/src/Plugins/BotSharp.Plugin.Planner/Using.cs @@ -28,7 +28,7 @@ global using BotSharp.Abstraction.Knowledges; global using BotSharp.Abstraction.Knowledges.Settings; global using BotSharp.Abstraction.Knowledges.Enums; global using BotSharp.Abstraction.VectorStorage.Models; -global using BotSharp.Abstraction.VectorStorage.Helpers; +global using BotSharp.Abstraction.VectorStorage.Extensions; global using BotSharp.Plugin.Planner.Hooks; global using BotSharp.Plugin.Planner.Enums; diff --git a/src/Plugins/BotSharp.Plugin.Twilio/Controllers/TwilioVoiceController.cs b/src/Plugins/BotSharp.Plugin.Twilio/Controllers/TwilioVoiceController.cs index 23a7b469..8304e3b2 100644 --- a/src/Plugins/BotSharp.Plugin.Twilio/Controllers/TwilioVoiceController.cs +++ b/src/Plugins/BotSharp.Plugin.Twilio/Controllers/TwilioVoiceController.cs @@ -82,8 +82,7 @@ public class TwilioVoiceController : TwilioController } } - response = new VoiceResponse() - .Redirect(new Uri($"{_settings.CallbackHost}/twilio/voice/{conversationId}/reply/{seqNum}?states={states}"), HttpMethod.Post); + response = new VoiceResponse().Redirect(new Uri($"{_settings.CallbackHost}/twilio/voice/{conversationId}/reply/{seqNum}?states={states}"), HttpMethod.Post); } else {