Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/apps/chat/task/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
save_select_datasource_answer, save_recommend_question_answer, \
get_old_questions, save_analysis_predict_record, rename_chat, get_chart_config, \
get_chat_chart_data, list_generate_sql_logs, list_generate_chart_logs, start_log, end_log, \
get_last_execute_sql_error
get_last_execute_sql_error, format_json_data
from apps.chat.models.chat_model import ChatQuestion, ChatRecord, Chat, RenameChat, ChatLog, OperationEnum, \
ChatFinishStep, AxisObj
from apps.data_training.curd.data_training import get_training_template
Expand Down Expand Up @@ -1133,7 +1133,7 @@ def run_task(self, in_chat: bool = True, stream: bool = True,
# todo generate picture
if chart['type'] != 'table':
yield '### generated chart picture\n\n'
image_url = request_picture(self.record.chat_id, self.record.id, chart, result)
image_url = request_picture(self.record.chat_id, self.record.id, chart, format_json_data(result))
SQLBotLogUtil.info(image_url)
if stream:
yield f'![{chart["type"]}]({image_url})'
Expand Down