BotSharp/src/Infrastructure/BotSharp.Abstraction/VectorStorage/IVectorDb.cs

14 lines
724 B
C#
Raw Normal View History

2023-06-26 23:08:24 +00:00
namespace BotSharp.Abstraction.VectorStorage;
2023-06-18 02:56:22 +00:00
public interface IVectorDb
{
string Name { get; }
2024-08-15 03:46:01 +00:00
2024-08-08 22:15:51 +00:00
Task<IEnumerable<string>> GetCollections();
2024-08-07 16:50:23 +00:00
Task<StringIdPagedItems<KnowledgeCollectionData>> GetCollectionData(string collectionName, KnowledgeFilter filter);
2023-06-18 18:15:00 +00:00
Task CreateCollection(string collectionName, int dim);
2024-07-17 21:03:46 +00:00
Task<bool> Upsert(string collectionName, string id, float[] vector, string text, Dictionary<string, string>? payload = null);
2024-08-15 03:46:01 +00:00
Task<IEnumerable<KnowledgeCollectionData>> Search(string collectionName, float[] vector, IEnumerable<string>? fields, int limit = 5, float confidence = 0.5f, bool withVector = false);
2024-08-08 22:15:51 +00:00
Task<bool> DeleteCollectionData(string collectionName, string id);
2023-06-18 02:56:22 +00:00
}