feat(ai): pgvector embedding infrastructure (#19)
CI / backend (push) Successful in 51s
CI / frontend (push) Successful in 15s
Deploy Staging / deploy (push) Successful in 46s
Security / secrets (push) Successful in 4s
Security / dependencies (push) Successful in 56s
CI / backend (pull_request) Successful in 54s
CI / frontend (pull_request) Successful in 15s
Security / secrets (pull_request) Successful in 3s
Security / dependencies (pull_request) Successful in 55s
CI / backend (push) Successful in 51s
CI / frontend (push) Successful in 15s
Deploy Staging / deploy (push) Successful in 46s
Security / secrets (push) Successful in 4s
Security / dependencies (push) Successful in 56s
CI / backend (pull_request) Successful in 54s
CI / frontend (pull_request) Successful in 15s
Security / secrets (pull_request) Successful in 3s
Security / dependencies (pull_request) Successful in 55s
This commit was merged in pull request #19.
This commit is contained in:
@@ -21,10 +21,11 @@ public static class DependencyInjection
|
||||
{
|
||||
public static IServiceCollection AddInfrastructure(this IServiceCollection services, IConfiguration config)
|
||||
{
|
||||
// EF Core / PostgreSQL
|
||||
// EF Core / PostgreSQL. UseVector() enables pgvector mapping for the semantic-search
|
||||
// embedding column (requires the 'vector' extension — added by the AddEmbeddingColumn migration).
|
||||
services.AddDbContext<AppDbContext>(opt =>
|
||||
opt.UseNpgsql(config.GetConnectionString("Postgres"),
|
||||
npg => npg.MigrationsAssembly(typeof(AppDbContext).Assembly.FullName)));
|
||||
npg => npg.MigrationsAssembly(typeof(AppDbContext).Assembly.FullName).UseVector()));
|
||||
services.AddScoped<IAppDbContext>(sp => sp.GetRequiredService<AppDbContext>());
|
||||
|
||||
// Options
|
||||
|
||||
Reference in New Issue
Block a user