mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-23 09:00:28 +03:00
49 lines
1.0 KiB
TypeScript
49 lines
1.0 KiB
TypeScript
/* eslint-disable */
|
|
import { Entity, Column, CreateDateColumn, PrimaryGeneratedColumn, Index, OneToOne, JoinColumn } from 'typeorm'
|
|
import { IChatMessage, MessageType } from '../../Interface'
|
|
import { ChatMessageFeedback } from './ChatMessageFeedback'
|
|
|
|
@Entity()
|
|
export class ChatMessage implements IChatMessage {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string
|
|
|
|
@Column()
|
|
role: MessageType
|
|
|
|
@Index()
|
|
@Column()
|
|
chatflowid: string
|
|
|
|
@Column({ type: 'text' })
|
|
content: string
|
|
|
|
@Column({ nullable: true, type: 'text' })
|
|
sourceDocuments?: string
|
|
|
|
@Column({ nullable: true, type: 'text' })
|
|
usedTools?: string
|
|
|
|
@Column({ nullable: true, type: 'text' })
|
|
fileAnnotations?: string
|
|
|
|
@Column()
|
|
chatType: string
|
|
|
|
@Column()
|
|
chatId: string
|
|
|
|
@Column({ nullable: true })
|
|
memoryType?: string
|
|
|
|
@Column({ nullable: true })
|
|
sessionId?: string
|
|
|
|
@CreateDateColumn()
|
|
createdDate: Date
|
|
|
|
@OneToOne(() => ChatMessageFeedback)
|
|
@JoinColumn()
|
|
feedback?: ChatMessageFeedback
|
|
}
|