From 6bfb2523f5974646031197f55c7299c6869bcaca Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Tue, 10 Sep 2024 15:11:40 -0500 Subject: [PATCH] add cos --- .../TencentCosService.Conversation.cs | 2 +- .../TencentCosService.KnowledgeBase.cs | 36 +++++++++++++++++++ .../Services/TencentCosService.User.cs | 2 +- .../Services/TencentCosService.cs | 1 + 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.KnowledgeBase.cs diff --git a/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.Conversation.cs b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.Conversation.cs index ff8dfa17..844afb65 100644 --- a/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.Conversation.cs +++ b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.Conversation.cs @@ -115,7 +115,7 @@ public partial class TencentCosService return foundMsgs; } - public bool SaveMessageFiles(string conversationId, string messageId, string source, List files) + public bool SaveMessageFiles(string conversationId, string messageId, string source, List files) { if (files.IsNullOrEmpty()) return false; diff --git a/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.KnowledgeBase.cs b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.KnowledgeBase.cs new file mode 100644 index 00000000..9d521142 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.KnowledgeBase.cs @@ -0,0 +1,36 @@ +using BotSharp.Abstraction.Knowledges.Models; + +namespace BotSharp.Plugin.TencentCos.Services; + +public partial class TencentCosService +{ + public bool SaveKnowledgeBaseFile(string collectionName, string vectorStoreProvider, string fileId, string fileName, Stream stream) + { + throw new NotImplementedException(); + } + + public bool DeleteKnowledgeFile(string collectionName, string vectorStoreProvider, string? fileId = null) + { + throw new NotImplementedException(); + } + + public bool SaveKnolwedgeBaseFileMeta(string collectionName, string vectorStoreProvider, string fileId, KnowledgeDocMetaData metaData) + { + throw new NotImplementedException(); + } + + public KnowledgeDocMetaData? GetKnowledgeBaseFileMeta(string collectionName, string vectorStoreProvider, string fileId) + { + throw new NotImplementedException(); + } + + public IEnumerable GetKnowledgeBaseFiles(string collectionName, string vectorStoreProvider) + { + throw new NotImplementedException(); + } + + public FileBinaryDataModel? GetKnowledgeBaseFileBinaryData(string collectionName, string vectorStoreProvider, string fileId) + { + throw new NotImplementedException(); + } +} diff --git a/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.User.cs b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.User.cs index a2308539..d955342d 100644 --- a/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.User.cs +++ b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.User.cs @@ -16,7 +16,7 @@ public partial class TencentCosService return found; } - public bool SaveUserAvatar(InputFileModel file) + public bool SaveUserAvatar(FileDataModel file) { if (file == null || string.IsNullOrEmpty(file.FileData)) return false; diff --git a/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.cs b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.cs index c48812f1..fe733923 100644 --- a/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.cs +++ b/src/Plugins/BotSharp.Plugin.TencentCos/Services/TencentCosService.cs @@ -1,4 +1,5 @@ using BotSharp.Abstraction.Files; +using BotSharp.Abstraction.Knowledges.Models; using BotSharp.Abstraction.Users; using BotSharp.Plugin.TencentCos.Settings; using System.Net.Mime;