Fehlerbehebung & Start Vector Search

This commit is contained in:
2024-07-11 17:09:35 +02:00
parent 7bd5e1aaf8
commit b4644ea295
20 changed files with 381 additions and 245 deletions

View File

@@ -1,6 +1,5 @@
import { boolean, char, doublePrecision, integer, jsonb, pgEnum, pgTable, serial, text, timestamp, uuid, varchar } from 'drizzle-orm/pg-core';
import { boolean, char, doublePrecision, integer, jsonb, pgEnum, pgTable, serial, text, timestamp, uuid, varchar, vector } from 'drizzle-orm/pg-core';
import { AreasServed, LicensedIn } from 'src/models/db.model';
export const PG_CONNECTION = 'PG_CONNECTION';
export const genderEnum = pgEnum('gender', ['male', 'female']);
export const customerTypeEnum = pgEnum('customerType', ['buyer', 'professional']);
@@ -58,6 +57,9 @@ export const businesses = pgTable('businesses', {
updated: timestamp('updated'),
visits: integer('visits'),
lastVisit: timestamp('lastVisit'),
// Neue Spalte für das OpenAI Embedding
embedding: vector('embedding', { dimensions: 1536 }),
// embedding: sql`vector(1536)`,
});
export const commercials = pgTable('commercials', {