Skip to content

Commit a030fa8

Browse files
committed
Merge branch 'main' of https://github.com/dataease/SQLBot
2 parents e68c027 + d75490a commit a030fa8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

backend/apps/chat/curd/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_chat_predict_data(session: SessionDep, chart_record_id: int):
6060
res = session.query(ChatRecord).options(load_only(ChatRecord.predict_data)).get(chart_record_id)
6161
if res:
6262
try:
63-
return orjson.loads(res.data)
63+
return orjson.loads(res.predict_data)
6464
except Exception:
6565
pass
6666
return ''

backend/apps/system/api/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async def update(session: SessionDep, editor: UserEditor, trans: Trans):
153153
raise Exception(f"User with id [{editor.id}] not found!")
154154
if editor.account != user_model.account:
155155
raise Exception(f"account cannot be changed!")
156-
if editor.email != user_model.email and check_email_exists(session=session, account=editor.email):
156+
if editor.email != user_model.email and check_email_exists(session=session, email=editor.email):
157157
raise Exception(trans('i18n_exist', msg = f"{trans('i18n_user.email')} [{editor.email}]"))
158158
if not check_email_format(editor.email):
159159
raise Exception(trans('i18n_format_invalid', key = f"{trans('i18n_user.email')} [{editor.email}]"))

backend/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ template:
138138
predict:
139139
system: |
140140
### 说明:
141-
你是一个数据分析师,你的任务是根据给定的数据进行数据预测,我将以json格式给你一组数据,你帮我预测之后的数据(一段可以展示趋势的数据,至少2个周期),用json格式返回,返回的格式需要与传入的数据格式保持一致。
141+
你是一个数据分析师,你的任务是根据给定的数据进行数据预测,我将以json格式给你一组数据,你帮我预测之后的数据(一段可以展示趋势的数据,至少2个周期),用json数组的格式返回,返回的格式需要与传入的数据格式保持一致。
142142
```json
143143
144144
无法预测或者不支持预测的数据请直接返回(不需要返回JSON格式):"抱歉,该数据无法进行预测。(有原因则返回无法预测的原因)"

frontend/src/views/chat/component/ChartComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ let chartInstance: BaseChart | undefined
4848
4949
function renderChart() {
5050
chartInstance = getChartInstance(params.type, chartId.value)
51-
console.log(chartInstance)
5251
if (chartInstance) {
5352
chartInstance.init(axis.value, params.data)
5453
chartInstance.render()
5554
}
55+
console.debug(chartInstance)
5656
}
5757
5858
function destroyChart() {

frontend/src/views/chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ function getChatPredictData(recordId?: number) {
590590
chatApi.get_chart_predict_data(recordId).then((response) => {
591591
currentChat.value.records.forEach((record) => {
592592
if (record.id === recordId) {
593-
record.predict_data = response.data ?? []
593+
record.predict_data = response ?? []
594594
}
595595
})
596596
})

0 commit comments

Comments
 (0)