BotSharp/src/Infrastructure/BotSharp.Abstraction/VectorStorage/IVectorDb.cs
2024-07-17 16:03:46 -05:00

10 lines
442 B
C#

namespace BotSharp.Abstraction.VectorStorage;
public interface IVectorDb
{
Task<List<string>> GetCollections();
Task CreateCollection(string collectionName, int dim);
Task<bool> Upsert(string collectionName, string id, float[] vector, string text, Dictionary<string, string>? payload = null);
Task<List<string>> Search(string collectionName, float[] vector, string returnFieldName, int limit = 5, float confidence = 0.5f);
}