fix: typo error fix (#1228)

This commit is contained in:
magic.chen
2024-03-01 19:33:16 +08:00
committed by GitHub
parent 0e61c55e12
commit ed4df23e4e
25 changed files with 39 additions and 37 deletions

View File

@@ -3,7 +3,7 @@ import os
from typing import Dict
from dbgpt._private.config import Config
from dbgpt.agent.plugin.commands.command_mange import ApiCall
from dbgpt.agent.plugin.commands.command_manage import ApiCall
from dbgpt.app.scene import BaseChat, ChatScene
from dbgpt.app.scene.chat_data.chat_excel.excel_learning.chat import ExcelLearning
from dbgpt.app.scene.chat_data.chat_excel.excel_reader import ExcelReader
@@ -45,7 +45,7 @@ class ChatExcel(BaseChat):
KNOWLEDGE_UPLOAD_ROOT_PATH, chat_mode.value(), self.select_param
)
)
self.api_call = ApiCall(display_registry=CFG.command_disply)
self.api_call = ApiCall(display_registry=CFG.command_display)
super().__init__(chat_param=chat_param)
@trace()
@@ -53,7 +53,7 @@ class ChatExcel(BaseChat):
input_values = {
"user_input": self.current_user_input,
"table_name": self.excel_reader.table_name,
"disply_type": self._generate_numbered_list(),
"display_type": self._generate_numbered_list(),
}
return input_values

View File

@@ -19,7 +19,7 @@ Please use the data structure column analysis information generated in the above
Constraint:
1.Please fully understand the user's problem and use duckdb sql for analysis. The analysis content is returned in the output format required below. Please output the sql in the corresponding sql parameter.
2.Please choose the best one from the display methods given below for data rendering, and put the type name into the name parameter value that returns the required format. If you cannot find the most suitable one, use 'Table' as the display method. , the available data display methods are as follows: {disply_type}
2.Please choose the best one from the display methods given below for data rendering, and put the type name into the name parameter value that returns the required format. If you cannot find the most suitable one, use 'Table' as the display method. , the available data display methods are as follows: {display_type}
3.The table name that needs to be used in SQL is: {table_name}. Please check the sql you generated and do not use column names that are not in the data structure.
4.Give priority to answering using data analysis. If the user's question does not involve data analysis, you can answer according to your understanding.
5.The sql part of the output content is converted to: <api-call><name>[data display mode]</name><args><sql>[correct duckdb data analysis sql]</sql></args></api - call> For this format, please refer to the return format requirements.
@@ -36,7 +36,7 @@ _DEFAULT_TEMPLATE_ZH = """
请使用历史对话中的数据结构信息在满足下面约束条件下通过duckdb sql数据分析回答用户的问题。
约束条件:
1.请充分理解用户的问题使用duckdb sql的方式进行分析 分析内容按下面要求的输出格式返回sql请输出在对应的sql参数中
2.请从如下给出的展示方式种选择最优的一种用以进行数据渲染将类型名称放入返回要求格式的name参数值种如果找不到最合适的则使用'Table'作为展示方式,可用数据展示方式如下: {disply_type}
2.请从如下给出的展示方式种选择最优的一种用以进行数据渲染将类型名称放入返回要求格式的name参数值种如果找不到最合适的则使用'Table'作为展示方式,可用数据展示方式如下: {display_type}
3.SQL中需要使用的表名是: {table_name},请检查你生成的sql不要使用没在数据结构中的列名
4.优先使用数据分析的方式回答,如果用户问题不涉及数据分析内容,你可以按你的理解进行回答
5.输出内容中sql部分转换为<api-call><name>[数据显示方式]</name><args><sql>[正确的duckdb数据分析sql]</sql></args></api- call> 这样的格式,参考返回格式要求