feat(agent):Fix agent bug (#1953)

Co-authored-by: aries_ckt <916701291@qq.com>
This commit is contained in:
明天
2024-09-04 10:59:03 +08:00
committed by GitHub
parent d72bfb2f5f
commit b951b50689
18 changed files with 67 additions and 46 deletions

View File

@@ -34,6 +34,8 @@ class ChatExcel(BaseChat):
"""
self.select_param = chat_param["select_param"]
if not self.select_param:
raise ValueError("Please upload the Excel document you want to talk to")
self.model_name = chat_param["model_name"]
chat_param["chat_mode"] = ChatScene.ChatExcel
self.chat_param = chat_param

View File

@@ -230,7 +230,7 @@ def is_chinese(text):
class ExcelReader:
def __init__(self, conv_uid, file_param):
def __init__(self, conv_uid: str, file_param: str):
self.conv_uid = conv_uid
self.file_param = file_param
if isinstance(file_param, str) and os.path.isabs(file_param):