MCPcopy Index your code
hub / github.com/dataease/SQLBot / constructor

Method constructor

frontend/src/api/chat.ts:91–145  ·  view source on GitHub ↗
(
    id?: number,
    chat_id?: number,
    create_time?: Date | string,
    finish_time?: Date | string,
    question?: string,
    sql_answer?: string,
    sql?: string,
    datasource?: number | undefined,
    data?: string | any,
    chart_answer?: string,
    chart?: string,
    analysis?: string,
    analysis_thinking?: string,
    predict?: string,
    predict_content?: string,
    predict_data?: string | any,
    finish?: boolean,
    error?: string,
    run_time?: number,
    first_chat?: boolean,
    recommended_question?: string,
    analysis_record_id?: number,
    predict_record_id?: number,
    regenerate_record_id?: number,
    duration?: number,
    total_tokens?: number
  )

Source from the content-addressed store, hash-verified

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
148export class Chat {

Callers

nothing calls this directly

Calls 1

getDateFunction · 0.90

Tested by

no test coverage detected