Skip to content

Commit

Permalink
update sql_info
Browse files Browse the repository at this point in the history
  • Loading branch information
LiChengxin007 committed Nov 24, 2023
1 parent c1c482d commit 3a3004a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ai/backend/aidb/analysis/analysis_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def deal_question(self, json_str, message):
obj = database_util.Main(db_id)
if_suss, db_info = obj.run()
if if_suss:
self.agent_instance_util.base_mysql_info = ' When connecting to the database, be sure to bring the port. This is database info :' + '\n' + str(
self.agent_instance_util.base_mysql_info = ' When connecting to the database, be sure to bring the port. This is mysql database info :' + '\n' + str(
db_info)
self.agent_instance_util.base_message = str(q_str)
self.agent_instance_util.db_id = db_id
Expand All @@ -87,7 +87,7 @@ async def deal_question(self, json_str, message):
obj = database_util.Main(db_id)
if_suss, db_info = obj.run()
if if_suss:
self.agent_instance_util.base_mysql_info = ' When connecting to the database, be sure to bring the port. This is database info :' + '\n' + str(
self.agent_instance_util.base_mysql_info = ' When connecting to the database, be sure to bring the port. This is mysql database info :' + '\n' + str(
db_info)
self.agent_instance_util.base_message = str(q_str)
self.agent_instance_util.db_id = db_id
Expand Down
9 changes: 4 additions & 5 deletions ai/backend/aidb/analysis/analysis_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def deal_question(self, json_str, message):
obj = database_util.Main(db_id)
if_suss, db_info = obj.run()
if if_suss:
self.agent_instance_util.base_mysql_info = ' When connecting to the database, be sure to bring the port. This is database info :' + '\n' + str(
self.agent_instance_util.base_postgresql_info = ' When connecting to the database, be sure to bring the port. This is postgresql database info :' + '\n' + str(
db_info)
self.agent_instance_util.base_message = str(q_str)
self.agent_instance_util.db_id = db_id
Expand All @@ -85,7 +85,7 @@ async def deal_question(self, json_str, message):
obj = database_util.Main(db_id)
if_suss, db_info = obj.run()
if if_suss:
self.agent_instance_util.base_mysql_info = ' When connecting to the database, be sure to bring the port. This is database info :' + '\n' + str(
self.agent_instance_util.base_postgresql_info = ' When connecting to the database, be sure to bring the port. This is postgresql database info :' + '\n' + str(
db_info)
self.agent_instance_util.base_message = str(q_str)
self.agent_instance_util.db_id = db_id
Expand Down Expand Up @@ -162,9 +162,8 @@ def get_agent_base_postgresql_assistant(self):
Reply "TERMINATE" in the end when everything is done.
When you find an answer, You are a report analysis, you have the knowledge and skills to turn raw data into information and insight, which can be used to make business decisions.include your analysis in your reply.
The only source data you need to process is csv files.
IMPORTANT:
First, determine whether there is a need to display data in the form of charts in the user's question, such as "Please give me a histogram of the top 10 sales of sub-category products." If such a need exists, it is recommended that the function call <task_postgresql_echart_code>.If it does not exist, directly answer the questions.
Be careful to avoid using postgresql special keywords in postgresql code.
""" + '\n' + self.agent_instance_util.base_postgresql_info + '\n' + CONFIG.python_base_dependency + '\n' + self.agent_instance_util.quesion_answer_language,
human_input_mode="NEVER",
user_name=self.user_name,
Expand Down

0 comments on commit 3a3004a

Please sign in to comment.