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

18 lines
994 B
C#
Raw Normal View History

2024-08-15 23:19:10 +00:00
using BotSharp.Abstraction.VectorStorage.Models;
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-23 16:25:44 +00:00
Task<StringIdPagedItems<VectorCollectionData>> GetPagedCollectionData(string collectionName, VectorFilter filter);
Task<IEnumerable<VectorCollectionData>> GetCollectionData(string collectionName, IEnumerable<Guid> ids, bool withPayload = false, bool withVector = false);
2024-08-29 19:30:47 +00:00
Task<bool> CreateCollection(string collectionName, int dimension);
Task<bool> DeleteCollection(string collectionName);
Task<bool> Upsert(string collectionName, Guid id, float[] vector, string text, Dictionary<string, string>? payload = null);
2024-08-15 23:19:10 +00:00
Task<IEnumerable<VectorCollectionData>> Search(string collectionName, float[] vector, IEnumerable<string>? fields, int limit = 5, float confidence = 0.5f, bool withVector = false);
Task<bool> DeleteCollectionData(string collectionName, Guid id);
2023-06-18 02:56:22 +00:00
}