import { | |
Entity, | |
PrimaryGeneratedColumn, | |
Column, | |
CreateDateColumn, | |
UpdateDateColumn, | |
} from 'typeorm'; | |
name: 'vector_embeddings' }) | ({|
export class VectorEmbedding { | |
'uuid') | (|
id: string; | |
type: 'varchar' }) | ({|
content_type: string; // 'market_server', 'tool', 'documentation', etc. | |
type: 'varchar' }) | ({|
content_id: string; // Reference ID to the original content | |
'text') | (|
text_content: string; // The text that was embedded | |
'simple-json') | (|
metadata: Record<string, any>; // Additional metadata about the embedding | |
({ | |
type: 'float', | |
array: true, | |
nullable: true, | |
}) | |
embedding: number[]; // The vector embedding - will be converted to vector type after table creation | |
type: 'int' }) | ({|
dimensions: number; // Dimensionality of the embedding vector | |
type: 'varchar' }) | ({|
model: string; // Model used to create the embedding | |
name: 'created_at', type: 'timestamp' }) | ({|
createdAt: Date; | |
name: 'updated_at', type: 'timestamp' }) | ({|
updatedAt: Date; | |
} | |
export default VectorEmbedding; | |