Skip to content

解决使用模型glm4-9b-chat报错“An error occurred during streaming” #5270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libs/chatchat-server/chatchat/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ class ApiModelSettings(BaseFileSettings):
HISTORY_LEN: int = 3
"""默认历史对话轮数"""

MAX_TOKENS: t.Optional[int] = None # TODO: 似乎与 LLM_MODEL_CONFIG 重复了
"""大模型最长支持的长度,如果不填写,则使用模型默认的最大长度,如果填写,则为用户设定的最大长度"""
MAX_TOKENS: t.Optional[int] = 4096 # TODO: 似乎与 LLM_MODEL_CONFIG 重复了
""" 大模型支持的最大长度。填写后,如果调用模型时请求体中设置了 `max_tokens`,则优先使用请求体中的 `max_tokens` 值;否则,将使用此默认值。"""


TEMPERATURE: float = 0.7
"""LLM通用对话参数"""
Expand Down