Skip to content

Commit

Permalink
Merge pull request #771 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
优化报错提示
  • Loading branch information
Ikaros-521 committed Apr 21, 2024
2 parents af5389e + f9dba61 commit 055c415
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,6 @@ tests/test_faster_whisper/*.wav

out/图像识别/*.png

main copy.py
main copy.py

data/*.db
18 changes: 11 additions & 7 deletions utils/gpt_model/sparkdesk.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ def __init__(self, data):
version = data["version"]
)
else:
self.sparkAPI = SparkAPI(
app_id = data["app_id"],
api_secret = data["api_secret"],
api_key = data["api_key"],
version = data["version"],
assistant_id = data["assistant_id"]
)
try:
self.sparkAPI = SparkAPI(
app_id = data["app_id"],
api_secret = data["api_secret"],
api_key = data["api_key"],
version = data["version"],
assistant_id = data["assistant_id"]
)
except TypeError as e:
logging.error(e)
logging.error("如果没有assistant_id传参,说明你的sparkdesk-api库版本太低,请更新至最新版本。\n请先激活conda环境,然后更新,参考命令:pip install git+https://gitee.com/ikaros-521/sparkdesk-api -U")
else:
logging.info("讯飞星火配置为空")

Expand Down
1 change: 1 addition & 0 deletions utils/my_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def config_load(self):
logging.debug('创建integral(积分)表')
except Exception as e:
logging.error(traceback.format_exc())
logging.error(f'数据库 {My_handle.config.get("database", "path")} 创建失败,请查看日志排查问题!!!')


# 重载config
Expand Down

0 comments on commit 055c415

Please sign in to comment.