mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-05-16 05:37:39 +08:00
feat(vector-db): integrate vector database for image search
- Replace pgvector with Microsoft Vector DB for image vector storage and search - Update Picture model to use float[] instead of Vector type - Modify PictureService to use VectorDbService for vector search - Remove vector-related code from MyDbContext - Add PictureVector model for Vector DB integration
This commit is contained in:
@@ -4,8 +4,6 @@ using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System.Text;
|
||||
using Foxel.Services.Attributes;
|
||||
using System.Reflection;
|
||||
using Foxel.Services.AI;
|
||||
using Foxel.Services.Auth;
|
||||
using Foxel.Services.Background;
|
||||
@@ -48,7 +46,7 @@ public static class ServiceCollectionExtensions
|
||||
|
||||
Console.WriteLine($"数据库连接: {connectionString}");
|
||||
services.AddDbContextFactory<MyDbContext>(options =>
|
||||
options.UseNpgsql(connectionString, o => o.UseVector()));
|
||||
options.UseNpgsql(connectionString));
|
||||
}
|
||||
|
||||
public static void AddApplicationOpenApi(this IServiceCollection services)
|
||||
|
||||
Reference in New Issue
Block a user