diff --git a/graph_chat/gen_data_report_agent.py b/graph_chat/gen_data_report_agent.py index e24926f..35de5a0 100644 --- a/graph_chat/gen_data_report_agent.py +++ b/graph_chat/gen_data_report_agent.py @@ -62,7 +62,7 @@ def _feedback_qa(state: DateReportAgentState) -> dict: try: user_question = state['question'] sql = state['sql'] - sql_result = state['data'] + sql_result = state.get('data', {}) template = get_base_template() feedback_temp = template['template']['result_feedback'] logger.info(f"feedback_temp is {feedback_temp}") diff --git a/util/load_ddl_doc.py b/util/load_ddl_doc.py index 0a2ef85..a547521 100644 --- a/util/load_ddl_doc.py +++ b/util/load_ddl_doc.py @@ -8,7 +8,7 @@ table_ddls = [ train_ddl.person_attendance_ddl,train_ddl.person_ac_area, train_ddl.person_ac_position, train_ddl.org_orgs_ddl, - #train_ddl.person_in_tibat + train_ddl.person_in_tibat, train_ddl.out_org_orgs_ddl, ] diff --git a/util/q_and_a_test1.py b/util/q_and_a_test1.py index cf9da12..0442bc6 100644 --- a/util/q_and_a_test1.py +++ b/util/q_and_a_test1.py @@ -688,7 +688,7 @@ question_and_answer = [ YJOA_APPSERVICE_DB.t_pr3rl2oj_outsourcing_org_new AS o ON p.external_unit = o.id WHERE p.dr = 0 -- 1. 筛选正常数据,排除已删除 AND p.person_status != '1' -- 2. 筛选已在流程中或已入库的人员,排除草稿 - AND o.name like '%联通%' -- 4. 核心条件:外 + AND o.name like '%联通%' -- 4. 核心条件:外 """,