diff --git a/pilot/configs/config.py b/pilot/configs/config.py index 0be6f18fc..804176357 100644 --- a/pilot/configs/config.py +++ b/pilot/configs/config.py @@ -18,6 +18,7 @@ class Config(metaclass=Singleton): """Initialize the Config class""" self.NEW_SERVER_MODE = False + self.SERVER_LIGHT_MODE = False # Gradio language version: en, zh self.LANGUAGE = os.getenv("LANGUAGE", "en") diff --git a/pilot/scene/chat_dashboard/template/sales_report/dashboard.json b/pilot/scene/chat_dashboard/template/sales_report/dashboard.json index 7301c5669..ab1e7abdf 100644 --- a/pilot/scene/chat_dashboard/template/sales_report/dashboard.json +++ b/pilot/scene/chat_dashboard/template/sales_report/dashboard.json @@ -3,7 +3,7 @@ "name": "sale_report", "introduce": "", "layout": "TODO", - "supported_chart_type":["FacetChart", "GaugeChart", "RadarChart", "Sheet", "LineChart", "PieChart", "BarChart", "PointChart", "IndicatorValue"], + "supported_chart_type":["FacetChart", "GaugeChart", "RadarChart", "Sheet", "LineChart", "PieChart", "BarChart", "PointChart", "KeyMetrics"], "key_metrics":[], "trends": [] } \ No newline at end of file diff --git a/pilot/scene/chat_db/auto_execute/example.py b/pilot/scene/chat_db/auto_execute/example.py index 9f877fdad..1e9e3e15f 100644 --- a/pilot/scene/chat_db/auto_execute/example.py +++ b/pilot/scene/chat_db/auto_execute/example.py @@ -11,7 +11,7 @@ EXAMPLES = [ "data": { "content": """{ \"thoughts\": \"thought text\", - \"sql\": \"SELECT city FROM users where user_name='test1'\", + \"sql\": \"SELECT city FROM user where user_name='test1'\", }""", "example": True, } @@ -26,7 +26,7 @@ EXAMPLES = [ "data": { "content": """{ \"thoughts\": \"thought text\", - \"sql\": \"SELECT b.* FROM users a LEFT JOIN tran_order b ON a.user_name=b.user_name where a.city='成都'\", + \"sql\": \"SELECT b.* FROM user a LEFT JOIN tran_order b ON a.user_name=b.user_name where a.city='成都'\", }""", "example": True, } diff --git a/pilot/scene/chat_db/auto_execute/out_parser.py b/pilot/scene/chat_db/auto_execute/out_parser.py index 9b02d1ba1..c7237671b 100644 --- a/pilot/scene/chat_db/auto_execute/out_parser.py +++ b/pilot/scene/chat_db/auto_execute/out_parser.py @@ -35,7 +35,7 @@ class DbChatOutputParser(BaseOutputParser): if len(data) <= 1: data.insert(0, ["result"]) df = pd.DataFrame(data[1:], columns=data[0]) - if not CFG.NEW_SERVER_MODE: + if not CFG.NEW_SERVER_MODE and not CFG.SERVER_LIGHT_MODE: table_style = """""" diff --git a/pilot/server/dbgpt_server.py b/pilot/server/dbgpt_server.py index 0279a2b86..032b2b896 100644 --- a/pilot/server/dbgpt_server.py +++ b/pilot/server/dbgpt_server.py @@ -103,7 +103,8 @@ if __name__ == "__main__": from pilot.server.llmserver import worker worker.start_check() CFG.NEW_SERVER_MODE = True - + else: + CFG.SERVER_LIGHT_MODE = True import uvicorn uvicorn.run(app, host="0.0.0.0", port=args.port)