mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-19 21:37:20 +08:00
* 新功能:
- WEBUI 添加对话评分功能
- 增加 /chat/feedback 接口,用于接收对话评分
- /chat/chat 接口返回值由 str 改为 {"text":str, "chat_history_id": str}
- init_database.py 添加 --create-tables --clear-tables 参数
依赖:
- streamlit-chatbox==1.1.11
开发者:
- ChatHistoryModel 的 id 字段支持自动生成
- SAVE_CHAT_HISTORY 改到 basic_config.py
* 修复:点击反馈后页面未刷新
---------
Co-authored-by: liqiankun.1111 <liqiankun.1111@bytedance.com>
Co-authored-by: liunux4odoo <liunux@qq.com>
Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com>
25 lines
573 B
Plaintext
25 lines
573 B
Plaintext
import logging
|
|
import os
|
|
import langchain
|
|
|
|
# 是否显示详细日志
|
|
log_verbose = False
|
|
langchain.verbose = False
|
|
|
|
# 是否保存聊天记录
|
|
SAVE_CHAT_HISTORY = False
|
|
|
|
# 通常情况下不需要更改以下内容
|
|
|
|
# 日志格式
|
|
LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s"
|
|
logger = logging.getLogger()
|
|
logger.setLevel(logging.INFO)
|
|
logging.basicConfig(format=LOG_FORMAT)
|
|
|
|
|
|
# 日志存储路径
|
|
LOG_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "logs")
|
|
if not os.path.exists(LOG_PATH):
|
|
os.mkdir(LOG_PATH)
|