mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-05-16 13:07:35 +08:00
feat: Support multiple vector database selection, add InMemory and Qdrant adapters, introduce admin dashboard
This commit is contained in:
@@ -9,9 +9,11 @@ using Foxel.Services.Auth;
|
||||
using Foxel.Services.Background;
|
||||
using Foxel.Services.Configuration;
|
||||
using Foxel.Services.Initializer;
|
||||
using Foxel.Services.Management;
|
||||
using Foxel.Services.Media;
|
||||
using Foxel.Services.Storage;
|
||||
using Foxel.Services.Storage.Providers;
|
||||
using Foxel.Services.VectorDB;
|
||||
|
||||
namespace Foxel.Extensions;
|
||||
|
||||
@@ -25,6 +27,8 @@ public static class ServiceCollectionExtensions
|
||||
services.AddSingleton<IAuthService, AuthService>();
|
||||
services.AddSingleton<ITagService, TagService>();
|
||||
services.AddSingleton<IAlbumService, AlbumService>();
|
||||
services.AddSingleton<IUserManagementService, UserManagementService>();
|
||||
services.AddSingleton<IPictureManagementService, PictureManagementService>();
|
||||
services.AddSingleton<IBackgroundTaskQueue, BackgroundTaskQueue>();
|
||||
services.AddHostedService<QueuedHostedService>();
|
||||
services.AddSingleton<LocalStorageProvider>();
|
||||
@@ -97,4 +101,11 @@ public static class ServiceCollectionExtensions
|
||||
policy => { policy.WithOrigins().AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod(); });
|
||||
});
|
||||
}
|
||||
|
||||
public static void AddVectorDbServices(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<VectorDbManager>();
|
||||
services.AddSingleton<IVectorDbService>(provider =>
|
||||
provider.GetRequiredService<VectorDbManager>());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user