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 fd18f948e..ff12ec803 100644
--- a/pilot/scene/chat_data/chat_excel/excel_analyze/chat.py
+++ b/pilot/scene/chat_data/chat_excel/excel_analyze/chat.py
@@ -76,7 +76,7 @@ class ChatExcel(BaseChat):
return None
chat_param = {
"chat_session_id": self.chat_session_id,
- "user_input": "[" + self.excel_reader.excel_file_name + "]" + " Analysis!",
+ "user_input": f"{self.excel_reader.excel_file_name} analyze!",
"parent_mode": self.chat_mode,
"select_param": self.excel_reader.excel_file_name,
"excel_reader": self.excel_reader,
diff --git a/pilot/scene/chat_data/chat_excel/excel_analyze/prompt.py b/pilot/scene/chat_data/chat_excel/excel_analyze/prompt.py
index 8fe63d4f9..140c098d3 100644
--- a/pilot/scene/chat_data/chat_excel/excel_analyze/prompt.py
+++ b/pilot/scene/chat_data/chat_excel/excel_analyze/prompt.py
@@ -22,7 +22,7 @@ Constraint:
5.The part of the required output format needs to be parsed by the code. Please ensure that this part of the content is output as required.
Please respond in the following format:
- thoughts.[Data display method][Correct duckdb data analysis sql]
+ Summary of your analytical thinking.[Data display method][Correct duckdb data analysis sql]
User Questions:
{user_input}
@@ -36,9 +36,9 @@ _DEFAULT_TEMPLATE_ZH = """
2.请从如下给出的展示方式种选择最优的一种用以进行数据渲染,将类型名称放入返回要求格式的name参数值种,如果找不到最合适的则使用'Table'作为展示方式,可用数据展示方式如下: {disply_type}
3.SQL中需要使用的表名是: {table_name},请检查你生成的sql,不要使用没在数据结构中的列名,。
4.优先使用数据分析的方式回答,如果用户问题不涉及数据分析内容,你可以按你的理解进行回答
- 5.要求的输出格式中部分需要被代码解析只想,请确保这部分内容按要求输出
+ 5.要求的输出格式中部分需要被代码解析执行,请确保这部分内容按要求输出
请确保你的输出格式如下:
- 你的想法.[数据展示方式][正确的duckdb数据分析sql]
+ 分析思路总结.[数据展示方式][正确的duckdb数据分析sql]
用户问题:{user_input}
"""
diff --git a/pilot/scene/chat_data/chat_excel/excel_learning/chat.py b/pilot/scene/chat_data/chat_excel/excel_learning/chat.py
index 4ed5e8f59..585bfe6e9 100644
--- a/pilot/scene/chat_data/chat_excel/excel_learning/chat.py
+++ b/pilot/scene/chat_data/chat_excel/excel_learning/chat.py
@@ -55,5 +55,6 @@ class ExcelLearning(BaseChat):
input_values = {
"data_example": json.dumps(datas, cls=DateTimeEncoder),
+ "file_name": self.excel_reader.excel_file_name
}
return input_values
diff --git a/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py b/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py
index eb26ec3dd..2eb534207 100644
--- a/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py
+++ b/pilot/scene/chat_data/chat_excel/excel_learning/prompt.py
@@ -12,7 +12,7 @@ CFG = Config()
_PROMPT_SCENE_DEFINE_EN = "You are a data analysis expert. "
_DEFAULT_TEMPLATE_EN = """
-This is an example data,please learn to understand the structure and content of this data:
+The following is part of the data of the user file {file_name}. Please learn to understand the structure and content of the data and output the parsing results as required:
{data_example}
Explain the meaning and function of each column, and give a simple and clear explanation of the technical terms, If it is a Date column, please summarize the Date format like: yyyy-MM-dd HH:MM:ss.
Please do not modify or translate the column names, make sure they are consistent with the given data column names.
@@ -25,7 +25,7 @@ Please return your answer in JSON format, the return format is as follows:
_PROMPT_SCENE_DEFINE_ZH = "你是一个数据分析专家. "
_DEFAULT_TEMPLATE_ZH = """
-下面是一份示例数据,请学习理解该数据的结构和内容:
+下面是用户文件{file_name}的一部分数据,请学习理解该数据的结构和内容,按要求输出解析结果:
{data_example}
分析各列数据的含义和作用,并对专业术语进行简单明了的解释, 如果是时间类型请给出时间格式类似:yyyy-MM-dd HH:MM:ss.
请不要修改或者翻译列名,确保和给出数据列名一致.
diff --git a/pilot/scene/chat_data/chat_excel/excel_reader.py b/pilot/scene/chat_data/chat_excel/excel_reader.py
index ad5893a73..779a37db3 100644
--- a/pilot/scene/chat_data/chat_excel/excel_reader.py
+++ b/pilot/scene/chat_data/chat_excel/excel_reader.py
@@ -251,7 +251,7 @@ if __name__ == "__main__":
class ExcelReader:
def __init__(self, file_path):
file_name = os.path.basename(file_path)
- file_name_without_extension = os.path.splitext(file_name)[0]
+ self.file_name_without_extension = os.path.splitext(file_name)[0]
encoding, confidence = detect_encoding(file_path)
logging.error(f"Detected Encoding: {encoding} (Confidence: {confidence})")
self.excel_file_name = file_name
@@ -280,7 +280,8 @@ class ExcelReader:
for column_name in df_tmp.columns:
self.columns_map.update({column_name: excel_colunm_format(column_name)})
try:
- self.df[column_name] = pd.to_numeric(self.df[column_name])
+ if not pd.api.types.is_datetime64_ns_dtype(self.df[column_name]) :
+ self.df[column_name] = pd.to_numeric(self.df[column_name])
self.df[column_name] = self.df[column_name].fillna(0)
except Exception as e:
print("can't transfor numeric column" + column_name)
diff --git a/pilot/server/static/404.html b/pilot/server/static/404.html
index 250e311af..fb4926946 100644
--- a/pilot/server/static/404.html
+++ b/pilot/server/static/404.html
@@ -1 +1 @@
-
\ No newline at end of file
diff --git a/pilot/server/static/404/index.html b/pilot/server/static/404/index.html
index 250e311af..fb4926946 100644
--- a/pilot/server/static/404/index.html
+++ b/pilot/server/static/404/index.html
@@ -1 +1 @@
-404: This page could not be found
\ No newline at end of file
diff --git a/pilot/server/static/agent/index.html b/pilot/server/static/agent/index.html
index c7a80a473..8671aafdd 100644
--- a/pilot/server/static/agent/index.html
+++ b/pilot/server/static/agent/index.html
@@ -1 +1 @@
-
\ No newline at end of file
diff --git a/pilot/server/static/chat/[scene]/[id]/index.html b/pilot/server/static/chat/[scene]/[id]/index.html
index 838c291bf..a03e8c85d 100644
--- a/pilot/server/static/chat/[scene]/[id]/index.html
+++ b/pilot/server/static/chat/[scene]/[id]/index.html
@@ -1 +1 @@
-
\ No newline at end of file
diff --git a/pilot/server/static/chat/index.html b/pilot/server/static/chat/index.html
index 422620a05..43b200212 100644
--- a/pilot/server/static/chat/index.html
+++ b/pilot/server/static/chat/index.html
@@ -1 +1 @@
-
\ No newline at end of file
diff --git a/pilot/server/static/database/index.html b/pilot/server/static/database/index.html
index b0d031ad5..303ca72e5 100644
--- a/pilot/server/static/database/index.html
+++ b/pilot/server/static/database/index.html
@@ -1 +1 @@
-
Powerful, scalable, secure relational database system by Microsoft.
DuckDB
In-memory analytical database with efficient query processing.
Sqlite
Lightweight embedded relational database with simplicity and portability.
ClickHouse
Columnar database for high-performance analytics and real-time queries.
Oracle
Robust, scalable, secure relational database widely used in enterprises.
Access
Easy-to-use relational database for small-scale applications by Microsoft.
MongoDB
Flexible, scalable NoSQL document database for web and mobile apps.
DB2
Scalable, secure relational database system developed by IBM.
HBase
Distributed, scalable NoSQL database for large structured/semi-structured data.
Redis
Fast, versatile in-memory data structure store as cache, DB, or broker.
Cassandra
Scalable, fault-tolerant distributed NoSQL database for large data.
Couchbase
High-performance NoSQL document database with distributed architecture.
PostgreSQL
Powerful open-source relational database with extensibility and SQL standards.
Spark
Unified engine for large-scale data analytics.
\ No newline at end of file
diff --git a/pilot/server/static/index.html b/pilot/server/static/index.html
index 088163073..000a05509 100644
--- a/pilot/server/static/index.html
+++ b/pilot/server/static/index.html
@@ -1 +1 @@
-
\ No newline at end of file
diff --git a/pilot/server/static/knowledge/chunk/index.html b/pilot/server/static/knowledge/chunk/index.html
index 40bb6387b..96f18011f 100644
--- a/pilot/server/static/knowledge/chunk/index.html
+++ b/pilot/server/static/knowledge/chunk/index.html
@@ -1 +1 @@
-
\ No newline at end of file
diff --git a/pilot/server/static/knowledge/index.html b/pilot/server/static/knowledge/index.html
index 48173a3ec..d683a8830 100644
--- a/pilot/server/static/knowledge/index.html
+++ b/pilot/server/static/knowledge/index.html
@@ -1 +1 @@
-
\ No newline at end of file
diff --git a/pilot/server/static/prompt/index.html b/pilot/server/static/prompt/index.html
index a1b5b8db3..d03aa5dd7 100644
--- a/pilot/server/static/prompt/index.html
+++ b/pilot/server/static/prompt/index.html
@@ -1 +1 @@
-