fix: fix some changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"local": {
|
||||
"baseUrl": "http://localhost:3000/v1"
|
||||
"baseUrl": "http://localhost:8000/v1"
|
||||
},
|
||||
"dev": {
|
||||
"baseUrl": "http://localhost:3000"
|
||||
|
||||
@@ -48,7 +48,7 @@ class ArticleUploadDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(240)
|
||||
title: string;
|
||||
title!: string;
|
||||
|
||||
@IsOptional()
|
||||
@MaxLength(2048)
|
||||
|
||||
@@ -23,33 +23,33 @@ export class ArticleChunk {
|
||||
@PrimaryGeneratedColumn('identity', {
|
||||
primaryKeyConstraintName: 'rag_article_chunk_pkey',
|
||||
})
|
||||
id: number;
|
||||
id!: number;
|
||||
|
||||
@Column('uuid')
|
||||
articleId: string;
|
||||
articleId!: string;
|
||||
|
||||
@ManyToOne(() => Article, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({
|
||||
name: 'articleId',
|
||||
foreignKeyConstraintName: 'rag_chunk_article_fkey',
|
||||
})
|
||||
article: Article;
|
||||
article!: Article;
|
||||
|
||||
@Column('integer')
|
||||
chunkIndex: number;
|
||||
chunkIndex!: number;
|
||||
|
||||
@Column('text')
|
||||
content: string;
|
||||
content!: string;
|
||||
|
||||
@Column('vector', { length: 384 })
|
||||
embedding: number[];
|
||||
embedding!: number[];
|
||||
|
||||
@Column('jsonb')
|
||||
metadata: ChunkMetadata;
|
||||
metadata!: ChunkMetadata;
|
||||
|
||||
@CreateDateColumn({ type: 'timestamptz' })
|
||||
createdAt: Date;
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn({ type: 'timestamptz' })
|
||||
updatedAt: Date;
|
||||
updatedAt!: Date;
|
||||
}
|
||||
|
||||
@@ -18,44 +18,44 @@ export type ArticleStatus = 'pending' | 'processing' | 'ready' | 'failed';
|
||||
)
|
||||
export class Article {
|
||||
@PrimaryColumn('uuid', { primaryKeyConstraintName: 'rag_article_pkey' })
|
||||
id: string;
|
||||
id!: string;
|
||||
|
||||
@Column('uuid')
|
||||
storageKey: string;
|
||||
storageKey!: string;
|
||||
|
||||
@Column('uuid', { nullable: true })
|
||||
runToken: string | null;
|
||||
runToken!: string | null;
|
||||
|
||||
@Column({ length: 240 })
|
||||
title: string;
|
||||
title!: string;
|
||||
|
||||
@Column({ length: 255 })
|
||||
fileName: string;
|
||||
fileName!: string;
|
||||
|
||||
@Column({ length: 120 })
|
||||
mimeType: string;
|
||||
mimeType!: string;
|
||||
|
||||
@Column('integer')
|
||||
byteSize: number;
|
||||
byteSize!: number;
|
||||
|
||||
@Column('varchar', { length: 2048, nullable: true })
|
||||
sourceUrl: string | null;
|
||||
sourceUrl!: string | null;
|
||||
|
||||
@Column('varchar', { length: 16 })
|
||||
status: ArticleStatus;
|
||||
status!: ArticleStatus;
|
||||
|
||||
@Column('integer', { default: 1 })
|
||||
generation: number;
|
||||
generation!: number;
|
||||
|
||||
@Column('varchar', { length: 300, nullable: true })
|
||||
embeddingModel: string | null;
|
||||
embeddingModel!: string | null;
|
||||
|
||||
@Column('varchar', { length: 80, nullable: true })
|
||||
errorCode: string | null;
|
||||
errorCode!: string | null;
|
||||
|
||||
@CreateDateColumn({ type: 'timestamptz' })
|
||||
createdAt: Date;
|
||||
createdAt!: Date;
|
||||
|
||||
@UpdateDateColumn({ type: 'timestamptz' })
|
||||
updatedAt: Date;
|
||||
updatedAt!: Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user