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

13 lines
609 B
C#
Raw Normal View History

2024-08-06 21:02:02 +00:00
using BotSharp.Abstraction.Knowledges.Models;
2023-06-26 23:08:24 +00:00
namespace BotSharp.Abstraction.VectorStorage;
2023-06-18 02:56:22 +00:00
public interface IVectorDb
{
Task<List<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);
Task<List<string>> Search(string collectionName, float[] vector, string returnFieldName, int limit = 5, float confidence = 0.5f);
2023-06-18 02:56:22 +00:00
}