| 89 | total_tokens: number | undefined |
| 90 | ) |
| 91 | constructor( |
| 92 | id?: number, |
| 93 | chat_id?: number, |
| 94 | create_time?: Date | string, |
| 95 | finish_time?: Date | string, |
| 96 | question?: string, |
| 97 | sql_answer?: string, |
| 98 | sql?: string, |
| 99 | datasource?: number | undefined, |
| 100 | data?: string | any, |
| 101 | chart_answer?: string, |
| 102 | chart?: string, |
| 103 | analysis?: string, |
| 104 | analysis_thinking?: string, |
| 105 | predict?: string, |
| 106 | predict_content?: string, |
| 107 | predict_data?: string | any, |
| 108 | finish?: boolean, |
| 109 | error?: string, |
| 110 | run_time?: number, |
| 111 | first_chat?: boolean, |
| 112 | recommended_question?: string, |
| 113 | analysis_record_id?: number, |
| 114 | predict_record_id?: number, |
| 115 | regenerate_record_id?: number, |
| 116 | duration?: number, |
| 117 | total_tokens?: number |
| 118 | ) { |
| 119 | this.id = id |
| 120 | this.chat_id = chat_id |
| 121 | this.create_time = getDate(create_time) |
| 122 | this.finish_time = getDate(finish_time) |
| 123 | this.question = question |
| 124 | this.sql_answer = sql_answer |
| 125 | this.sql = sql |
| 126 | this.datasource = datasource |
| 127 | this.data = data |
| 128 | this.chart_answer = chart_answer |
| 129 | this.chart = chart |
| 130 | this.analysis = analysis |
| 131 | this.analysis_thinking = analysis_thinking |
| 132 | this.predict = predict |
| 133 | this.predict_content = predict_content |
| 134 | this.predict_data = predict_data |
| 135 | this.finish = !!finish |
| 136 | this.error = error |
| 137 | this.run_time = run_time ?? 0 |
| 138 | this.first_chat = !!first_chat |
| 139 | this.recommended_question = recommended_question |
| 140 | this.analysis_record_id = analysis_record_id |
| 141 | this.predict_record_id = predict_record_id |
| 142 | this.regenerate_record_id = regenerate_record_id |
| 143 | this.duration = duration |
| 144 | this.total_tokens = total_tokens |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | export class Chat { |