From bd7b6fc004a1aff80ab8903ea14ae38cf1a13776 Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Fri, 10 Nov 2023 17:30:40 +0800 Subject: [PATCH] feat(ChatExcel): ChatExcel Use AntV Chart 1.Native Support AntvChart --- pilot/scene/base_chat.py | 6 +++--- pilot/scene/chat_data/chat_excel/excel_analyze/chat.py | 1 + pilot/scene/chat_knowledge/v1/chat.py | 2 +- pilot/server/static/404.html | 2 +- pilot/server/static/404/index.html | 2 +- .../static/_next/static/chunks/604.8b28a3b59fbde616.js | 1 - .../_next/static/chunks/pages/_app-3db37c9317611ef2.js | 4 ---- .../_next/static/chunks/pages/database-2066e1a37e227df6.js | 1 - .../_next/static/chunks/pages/knowledge-40fc3593b22ec10a.js | 1 - pilot/server/static/_next/static/css/54555572d8a5a0b4.css | 3 --- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 pilot/server/static/agent/index.html | 2 +- pilot/server/static/chat/[scene]/[id]/index.html | 2 +- pilot/server/static/chat/index.html | 2 +- pilot/server/static/database/index.html | 2 +- pilot/server/static/index.html | 2 +- pilot/server/static/knowledge/chunk/index.html | 2 +- pilot/server/static/knowledge/index.html | 2 +- pilot/server/static/prompt/index.html | 2 +- 20 files changed, 15 insertions(+), 24 deletions(-) delete mode 100644 pilot/server/static/_next/static/chunks/604.8b28a3b59fbde616.js delete mode 100644 pilot/server/static/_next/static/chunks/pages/database-2066e1a37e227df6.js delete mode 100644 pilot/server/static/_next/static/chunks/pages/knowledge-40fc3593b22ec10a.js delete mode 100644 pilot/server/static/_next/static/css/54555572d8a5a0b4.css rename pilot/server/static/_next/static/{ibr_-YB0MTU2YAVg7DiR2 => da-xDIBATE5Wzj56dGCTR}/_buildManifest.js (100%) rename pilot/server/static/_next/static/{ibr_-YB0MTU2YAVg7DiR2 => da-xDIBATE5Wzj56dGCTR}/_ssgManifest.js (100%) diff --git a/pilot/scene/base_chat.py b/pilot/scene/base_chat.py index 92a018794..245c03b34 100644 --- a/pilot/scene/base_chat.py +++ b/pilot/scene/base_chat.py @@ -174,8 +174,8 @@ class BaseChat(ABC): def stream_plugin_call(self, text): return text - def knowledge_reference_call(self, text): - return text + # def knowledge_reference_call(self, text): + # return text async def check_iterator_end(iterator): try: @@ -218,7 +218,7 @@ class BaseChat(ABC): view_msg = view_msg.replace("\n", "\\n") yield view_msg self.current_message.add_ai_message(msg) - view_msg = self.knowledge_reference_call(msg) + # view_msg = self.knowledge_reference_call(msg) self.current_message.add_view_message(view_msg) span.end() except Exception as e: diff --git a/pilot/scene/chat_data/chat_excel/excel_analyze/chat.py b/pilot/scene/chat_data/chat_excel/excel_analyze/chat.py index 57f5b06bf..a2cf586f1 100644 --- a/pilot/scene/chat_data/chat_excel/excel_analyze/chat.py +++ b/pilot/scene/chat_data/chat_excel/excel_analyze/chat.py @@ -14,6 +14,7 @@ from pilot.scene.chat_data.chat_excel.excel_learning.chat import ExcelLearning from pilot.common.path_utils import has_path from pilot.configs.model_config import LLM_MODEL_CONFIG, KNOWLEDGE_UPLOAD_ROOT_PATH from pilot.base_modules.agent.common.schema import Status +from pilot.utils.tracer import root_tracer, trace CFG = Config() diff --git a/pilot/scene/chat_knowledge/v1/chat.py b/pilot/scene/chat_knowledge/v1/chat.py index a9c63b268..e4e373cfe 100644 --- a/pilot/scene/chat_knowledge/v1/chat.py +++ b/pilot/scene/chat_knowledge/v1/chat.py @@ -89,7 +89,7 @@ class ChatKnowledge(BaseChat): last_output = last_output + reference yield last_output - def knowledge_reference_call(self, text): + def stream_plugin_call(self, text): """return reference""" return text + f"\n\n{self.parse_source_view(self.sources)}" diff --git a/pilot/server/static/404.html b/pilot/server/static/404.html index 8bfda489e..8efd87b48 100644 --- a/pilot/server/static/404.html +++ b/pilot/server/static/404.html @@ -1 +1 @@ -
No data |
No data |