From 32670cdb290e1afe7a3a54f7bed36a721ad2f73e Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Tue, 5 Sep 2023 16:29:26 +0800 Subject: [PATCH] fix(editor): Plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔥1.AutoGpt Plugin Compatible --- pilot/commands/disply_type/show_chart_gen.py | 4 +- pilot/common/plugins.py | 6 +- .../chat_excel/excel_learning/out_parser.py | 6 +- pilot/scene/chat_execution/out_parser.py | 6 +- pilot/server/static/404.html | 2 +- pilot/server/static/404/index.html | 2 +- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 .../static/chunks/116-4b57b4ff0a58288d.js | 1 - .../static/chunks/119-fa8ae2133f5d13d9.js | 1 - .../static/chunks/15-9581813bc8d52fcc.js | 1 + .../static/chunks/332-ec398b4402e46d25.js | 80 ++++++++++++++++++ .../static/chunks/341-7283db898ec4f602.js | 1 - .../static/chunks/537-323ddb61f3df4dff.js | 14 --- .../static/chunks/554-82424166ff4e65a9.js | 80 ------------------ .../static/chunks/627-04a31c813e7605da.js | 3 + .../static/chunks/686-7d88801a440dd051.js | 1 + .../chunks/7e4358a0-7f236e540ced7dbb.js | 1 - .../static/chunks/822-2f35ce51fd101c79.js | 1 + .../static/chunks/83-c015e345dfcb64fb.js | 1 + .../static/chunks/868-4fb3b88c6a344205.js | 14 +++ .../static/chunks/919-712e9f0bec0b7521.js | 1 - .../static/chunks/920-658fd1354dc8c0ad.js | 3 - .../chunks/app/chat/page-81e618fbf297a8f1.js | 1 - .../chunks/app/chat/page-de3cfaa8003bf23d.js | 1 + .../app/database/page-8ec81104aaf179eb.js | 1 + .../app/database/page-e902ea9d4cd28c05.js | 1 - .../chunklist/page-92af71423560a516.js | 1 + .../chunklist/page-dbeb503daadacce2.js | 1 - .../documents/page-177893af8d283d70.js | 1 - .../documents/page-32e2e8c7dab8cad0.js | 1 + .../app/datastores/page-2623759355c277de.js | 1 - .../app/datastores/page-9c051887f65fc66a.js | 1 + .../chunks/app/layout-8f881e40fdff6264.js | 1 - .../chunks/app/layout-ead8b22d15e328b1.js | 1 + .../chunks/app/page-9182e94b81cebd6f.js | 1 + .../chunks/app/page-f661a9e114872302.js | 1 - .../static/chunks/webpack-01b3999c74014454.js | 1 - .../static/chunks/webpack-de65dbaa858cf21b.js | 1 + .../_next/static/css/5ccf1b8330a1b392.css | 3 + .../_next/static/css/76124ca107b00a15.css | 3 - pilot/server/static/chat/index.html | 2 +- pilot/server/static/chat/index.txt | 14 +-- pilot/server/static/database/index.html | 2 +- pilot/server/static/database/index.txt | 14 +-- .../datastores/documents/chunklist/index.html | 2 +- .../datastores/documents/chunklist/index.txt | 14 +-- .../static/datastores/documents/index.html | 2 +- .../static/datastores/documents/index.txt | 14 +-- pilot/server/static/datastores/index.html | 2 +- pilot/server/static/datastores/index.txt | 14 +-- pilot/server/static/icons/access.png | Bin 0 -> 6982 bytes pilot/server/static/icons/cassandra.png | Bin 0 -> 4967 bytes pilot/server/static/icons/couchbase.png | Bin 0 -> 3921 bytes pilot/server/static/icons/db2.png | Bin 0 -> 768 bytes pilot/server/static/icons/hbase.png | Bin 0 -> 4396 bytes pilot/server/static/icons/postgresql.png | Bin 0 -> 9667 bytes pilot/server/static/icons/redis.png | Bin 0 -> 5267 bytes pilot/server/static/icons/sqlite.png | Bin 0 -> 4572 bytes pilot/server/static/index.html | 2 +- pilot/server/static/index.txt | 14 +-- 61 files changed, 174 insertions(+), 173 deletions(-) rename pilot/server/static/_next/static/{g4yxzotH2uCI1z7uk8kQC => c9JPLFJPIFJZCqrC_XlGA}/_buildManifest.js (100%) rename pilot/server/static/_next/static/{g4yxzotH2uCI1z7uk8kQC => c9JPLFJPIFJZCqrC_XlGA}/_ssgManifest.js (100%) delete mode 100644 pilot/server/static/_next/static/chunks/116-4b57b4ff0a58288d.js delete mode 100644 pilot/server/static/_next/static/chunks/119-fa8ae2133f5d13d9.js create mode 100644 pilot/server/static/_next/static/chunks/15-9581813bc8d52fcc.js create mode 100644 pilot/server/static/_next/static/chunks/332-ec398b4402e46d25.js delete mode 100644 pilot/server/static/_next/static/chunks/341-7283db898ec4f602.js delete mode 100644 pilot/server/static/_next/static/chunks/537-323ddb61f3df4dff.js delete mode 100644 pilot/server/static/_next/static/chunks/554-82424166ff4e65a9.js create mode 100644 pilot/server/static/_next/static/chunks/627-04a31c813e7605da.js create mode 100644 pilot/server/static/_next/static/chunks/686-7d88801a440dd051.js delete mode 100644 pilot/server/static/_next/static/chunks/7e4358a0-7f236e540ced7dbb.js create mode 100644 pilot/server/static/_next/static/chunks/822-2f35ce51fd101c79.js create mode 100644 pilot/server/static/_next/static/chunks/83-c015e345dfcb64fb.js create mode 100644 pilot/server/static/_next/static/chunks/868-4fb3b88c6a344205.js delete mode 100644 pilot/server/static/_next/static/chunks/919-712e9f0bec0b7521.js delete mode 100644 pilot/server/static/_next/static/chunks/920-658fd1354dc8c0ad.js delete mode 100644 pilot/server/static/_next/static/chunks/app/chat/page-81e618fbf297a8f1.js create mode 100644 pilot/server/static/_next/static/chunks/app/chat/page-de3cfaa8003bf23d.js create mode 100644 pilot/server/static/_next/static/chunks/app/database/page-8ec81104aaf179eb.js delete mode 100644 pilot/server/static/_next/static/chunks/app/database/page-e902ea9d4cd28c05.js create mode 100644 pilot/server/static/_next/static/chunks/app/datastores/documents/chunklist/page-92af71423560a516.js delete mode 100644 pilot/server/static/_next/static/chunks/app/datastores/documents/chunklist/page-dbeb503daadacce2.js delete mode 100644 pilot/server/static/_next/static/chunks/app/datastores/documents/page-177893af8d283d70.js create mode 100644 pilot/server/static/_next/static/chunks/app/datastores/documents/page-32e2e8c7dab8cad0.js delete mode 100644 pilot/server/static/_next/static/chunks/app/datastores/page-2623759355c277de.js create mode 100644 pilot/server/static/_next/static/chunks/app/datastores/page-9c051887f65fc66a.js delete mode 100644 pilot/server/static/_next/static/chunks/app/layout-8f881e40fdff6264.js create mode 100644 pilot/server/static/_next/static/chunks/app/layout-ead8b22d15e328b1.js create mode 100644 pilot/server/static/_next/static/chunks/app/page-9182e94b81cebd6f.js delete mode 100644 pilot/server/static/_next/static/chunks/app/page-f661a9e114872302.js delete mode 100644 pilot/server/static/_next/static/chunks/webpack-01b3999c74014454.js create mode 100644 pilot/server/static/_next/static/chunks/webpack-de65dbaa858cf21b.js create mode 100644 pilot/server/static/_next/static/css/5ccf1b8330a1b392.css delete mode 100644 pilot/server/static/_next/static/css/76124ca107b00a15.css create mode 100644 pilot/server/static/icons/access.png create mode 100644 pilot/server/static/icons/cassandra.png create mode 100644 pilot/server/static/icons/couchbase.png create mode 100644 pilot/server/static/icons/db2.png create mode 100644 pilot/server/static/icons/hbase.png create mode 100644 pilot/server/static/icons/postgresql.png create mode 100644 pilot/server/static/icons/redis.png create mode 100644 pilot/server/static/icons/sqlite.png diff --git a/pilot/commands/disply_type/show_chart_gen.py b/pilot/commands/disply_type/show_chart_gen.py index 052b9d971..097685369 100644 --- a/pilot/commands/disply_type/show_chart_gen.py +++ b/pilot/commands/disply_type/show_chart_gen.py @@ -142,7 +142,7 @@ def response_line_chart(speak: str, df: DataFrame) -> str: sns.lineplot(data=df, x=x, y=y, ax=ax, palette="Set2") ax.yaxis.set_major_formatter(mtick.FuncFormatter(lambda y, _: "{:,.0f}".format(y))) - ax.yaxis.set_major_formatter(mtick.FuncFormatter(lambda x, _: "{:,.0f}".format(x))) + ax.xaxis.set_major_formatter(mtick.FuncFormatter(lambda x, _: "{:,.0f}".format(x))) chart_name = "line_" + str(uuid.uuid1()) + ".png" chart_path = static_message_img_path + "/" + chart_name @@ -231,7 +231,7 @@ def response_bar_chart(speak: str, df: DataFrame) -> str: # 设置 y 轴刻度格式为普通数字格式 ax.yaxis.set_major_formatter(mtick.FuncFormatter(lambda y, _: "{:,.0f}".format(y))) - ax.yaxis.set_major_formatter(mtick.FuncFormatter(lambda x, _: "{:,.0f}".format(x))) + ax.xaxis.set_major_formatter(mtick.FuncFormatter(lambda x, _: "{:,.0f}".format(x))) chart_name = "bar_" + str(uuid.uuid1()) + ".png" chart_path = static_message_img_path + "/" + chart_name diff --git a/pilot/common/plugins.py b/pilot/common/plugins.py index 3ee5f4ac2..1548a4e31 100644 --- a/pilot/common/plugins.py +++ b/pilot/common/plugins.py @@ -145,9 +145,9 @@ def scan_plugins(cfg: Config, debug: bool = False) -> List[AutoGPTPluginTemplate a_module = getattr(zipped_module, key) a_keys = dir(a_module) if ( - "_abc_impl" in a_keys - and a_module.__name__ != "AutoGPTPluginTemplate" - # and denylist_allowlist_check(a_module.__name__, cfg) + "_abc_impl" in a_keys + and a_module.__name__ != "AutoGPTPluginTemplate" + # and denylist_allowlist_check(a_module.__name__, cfg) ): loaded_plugins.append(a_module()) diff --git a/pilot/scene/chat_data/chat_excel/excel_learning/out_parser.py b/pilot/scene/chat_data/chat_excel/excel_learning/out_parser.py index c990b042c..b4dece331 100644 --- a/pilot/scene/chat_data/chat_excel/excel_learning/out_parser.py +++ b/pilot/scene/chat_data/chat_excel/excel_learning/out_parser.py @@ -43,8 +43,8 @@ class LearningExcelOutputParser(BaseOutputParser): def parse_view_response(self, speak, data) -> str: if data: ### tool out data to table view - html_title = f"### **数据简介**\n{data.desciption} " - html_colunms = f"### **数据结构**\n" + html_title = f"### **Data Summary**\n{data.desciption} " + html_colunms = f"### **Data Structure**\n" column_index = 0 for item in data.clounms: column_index += 1 @@ -54,7 +54,7 @@ class LearningExcelOutputParser(BaseOutputParser): html_colunms + f"- **{column_index}.[{key}]** _{item[key]}_\n" ) - html_plans = f"### **分析计划**\n" + html_plans = f"### **Recommended analysis plan**\n" index = 0 for item in data.plans: index += 1 diff --git a/pilot/scene/chat_execution/out_parser.py b/pilot/scene/chat_execution/out_parser.py index 3db6ecff4..2ba9b9da0 100644 --- a/pilot/scene/chat_execution/out_parser.py +++ b/pilot/scene/chat_execution/out_parser.py @@ -13,8 +13,8 @@ logger = build_logger("webserver", LOGDIR + "DbChatOutputParser.log") class PluginAction(NamedTuple): command: Dict - speak: str - thoughts: str + speak: str = "" + thoughts: str = "" class PluginChatOutputParser(BaseOutputParser): @@ -28,6 +28,8 @@ class PluginChatOutputParser(BaseOutputParser): except Exception as e: raise ValueError("model server out not fllow the prompt!") + speak = "" + thoughts="" for key in sorted(response): if key.strip() == "command": command = response[key] diff --git a/pilot/server/static/404.html b/pilot/server/static/404.html index 954920cda..40c72fd52 100644 --- a/pilot/server/static/404.html +++ b/pilot/server/static/404.html @@ -1 +1 @@ -