2023-06-18 02:56:22 +00:00
|
|
|
using BotSharp.Abstraction.Plugins;
|
2023-06-26 23:08:24 +00:00
|
|
|
using BotSharp.Abstraction.VectorStorage;
|
2023-06-18 02:56:22 +00:00
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Plugin.Qdrant;
|
|
|
|
|
|
|
|
|
|
public class QdrantPlugin : IBotSharpPlugin
|
|
|
|
|
{
|
2023-12-26 03:16:41 +00:00
|
|
|
public string Name => "Qdrant";
|
|
|
|
|
public string Description => "Vector Database - Make the most of your Unstructured Data";
|
|
|
|
|
public string IconUrl => "https://qdrant.tech/images/logo_with_text.png";
|
2023-06-18 02:56:22 +00:00
|
|
|
public void RegisterDI(IServiceCollection services, IConfiguration config)
|
|
|
|
|
{
|
|
|
|
|
var settings = new QdrantSetting();
|
|
|
|
|
config.Bind("Qdrant", settings);
|
|
|
|
|
services.AddSingleton(x => settings);
|
|
|
|
|
|
2023-06-27 23:36:50 +00:00
|
|
|
services.AddScoped<IVectorDb, QdrantDb>();
|
2023-06-18 02:56:22 +00:00
|
|
|
}
|
|
|
|
|
}
|