Merge branch 'features/refine-audio-handler' of https://github.com/iceljc/BotSharp into features/refine-audio-handler
This commit is contained in:
commit
ddd1d0a28e
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TargetFramework)</TargetFramework>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TargetFramework)</TargetFramework>
|
||||
|
|
|
|||
|
|
@ -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<IExecutor, InstructExecutor>();
|
||||
services.AddScoped<IInstructService, InstructService>();
|
||||
services.AddScoped<ITokenStatistics, TokenStatistics>();
|
||||
|
||||
services.AddScoped<IKnowledgeService, KnowledgeService>();
|
||||
}
|
||||
|
||||
public bool AttachMenu(List<PluginMenuDef> menu)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
namespace BotSharp.Plugin.KnowledgeBase.Services;
|
||||
namespace BotSharp.Core.Knowledges.Services;
|
||||
|
||||
public partial class KnowledgeService
|
||||
{
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
namespace BotSharp.Plugin.KnowledgeBase.Services;
|
||||
using BotSharp.Abstraction.VectorStorage.Models;
|
||||
|
||||
namespace BotSharp.Core.Knowledges.Services;
|
||||
|
||||
public partial class KnowledgeService
|
||||
{
|
||||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
using BotSharp.Abstraction.VectorStorage.Helpers;
|
||||
using BotSharp.Abstraction.VectorStorage.Extensions;
|
||||
|
||||
namespace BotSharp.Plugin.KnowledgeBase.Functions;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ public class KnowledgeBasePlugin : IBotSharpPlugin
|
|||
return settingService.Bind<KnowledgeBaseSettings>("KnowledgeBase");
|
||||
});
|
||||
|
||||
services.AddScoped<IKnowledgeService, KnowledgeService>();
|
||||
services.AddSingleton<IPdf2TextConverter, PigPdf2TextConverter>();
|
||||
services.AddScoped<IAgentUtilityHook, KnowledgeBaseUtilityHook>();
|
||||
services.AddScoped<IAgentHook, KnowledgeBaseAgentHook>();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue