瀏覽代碼

The default max tokens of 215 is too small, answers are often cut off.I will modify it to 512 to address this issue. (#845)

### What problem does this PR solve?

### Type of change

- [x] Refactoring
tags/v0.6.0
dashi6174 1 年之前
父節點
當前提交
9a01d1b876
No account linked to committer's email address
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1
    1
      api/db/db_models.py
  2. 2
    2
      web/src/constants/knowledge.ts

+ 1
- 1
api/db/db_models.py 查看文件

@@ -759,7 +759,7 @@ class Dialog(DataBaseModel):
help_text="English|Chinese")
llm_id = CharField(max_length=128, null=False, help_text="default llm ID")
llm_setting = JSONField(null=False, default={"temperature": 0.1, "top_p": 0.3, "frequency_penalty": 0.7,
"presence_penalty": 0.4, "max_tokens": 215})
"presence_penalty": 0.4, "max_tokens": 512})
prompt_type = CharField(
max_length=16,
null=False,

+ 2
- 2
web/src/constants/knowledge.ts 查看文件

@@ -31,14 +31,14 @@ export const settledModelVariableMap = {
top_p: 0.3,
frequency_penalty: 0.7,
presence_penalty: 0.4,
max_tokens: 215,
max_tokens: 512,
},
[ModelVariableType.Balance]: {
temperature: 0.5,
top_p: 0.5,
frequency_penalty: 0.7,
presence_penalty: 0.4,
max_tokens: 215,
max_tokens: 512,
},
};


Loading…
取消
儲存