BotSharp/src/Infrastructure/BotSharp.Abstraction/Knowledges/IKnowledgeService.cs

32 lines
1.4 KiB
C#
Raw Normal View History

2024-08-15 23:19:10 +00:00
using BotSharp.Abstraction.Graph.Models;
using BotSharp.Abstraction.VectorStorage.Models;
2023-06-17 02:42:35 +00:00
namespace BotSharp.Abstraction.Knowledges;
public interface IKnowledgeService
{
2024-08-29 19:30:47 +00:00
#region Vector
2024-09-09 19:16:09 +00:00
Task<bool> CreateVectorCollection(string collectionName, string collectionType, int dimension, string provider, string model);
2024-08-29 19:30:47 +00:00
Task<bool> DeleteVectorCollection(string collectionName);
2024-09-09 19:16:09 +00:00
Task<IEnumerable<string>> GetVectorCollections(string type);
2024-08-15 23:19:10 +00:00
Task<IEnumerable<VectorSearchResult>> SearchVectorKnowledge(string query, string collectionName, VectorSearchOptions options);
2024-08-23 18:49:06 +00:00
Task<StringIdPagedItems<VectorSearchResult>> GetPagedVectorCollectionData(string collectionName, VectorFilter filter);
2024-08-15 23:19:10 +00:00
Task<bool> DeleteVectorCollectionData(string collectionName, string id);
2024-08-23 16:25:44 +00:00
Task<bool> CreateVectorCollectionData(string collectionName, VectorCreateModel create);
2024-08-23 03:13:40 +00:00
Task<bool> UpdateVectorCollectionData(string collectionName, VectorUpdateModel update);
2024-08-29 19:30:47 +00:00
#endregion
#region Graph
2024-08-15 23:19:10 +00:00
Task<GraphSearchResult> SearchGraphKnowledge(string query, GraphSearchOptions options);
2024-09-09 15:00:46 +00:00
#endregion
#region Document
2024-09-10 19:02:25 +00:00
Task<UploadKnowledgeResponse> UploadKnowledgeDocuments(string collectionName, IEnumerable<ExternalFileModel> files);
Task<bool> DeleteKnowledgeDocument(string collectionName, string fileId);
2024-08-29 19:30:47 +00:00
#endregion
2024-09-09 16:32:31 +00:00
#region Common
Task<bool> RefreshVectorKnowledgeConfigs(VectorCollectionConfigsModel configs);
#endregion
2023-06-17 02:42:35 +00:00
}