This commit is contained in:
parent
b42b5f090b
commit
ccf3398741
12
meta_ui.py
12
meta_ui.py
|
|
@ -19,8 +19,10 @@ def chat(user_message, history, max_tokens, temperature):
|
|||
payload = {
|
||||
"model": MODEL_NAME,
|
||||
"text": user_message, # generate 使用 text
|
||||
"max_tokens": max_tokens,
|
||||
"temperature": temperature
|
||||
"sampling_params": { # ★ 放进 sampling_params
|
||||
"max_new_tokens": int(max_tokens),
|
||||
"temperature": temperature
|
||||
}
|
||||
}
|
||||
|
||||
print(f"\n🟡 [{now()} chat] payload:\n{json.dumps(payload, ensure_ascii=False, indent=2)}")
|
||||
|
|
@ -59,8 +61,10 @@ def test_api(max_tokens, temperature):
|
|||
payload = {
|
||||
"model": MODEL_NAME,
|
||||
"text": "Ping?",
|
||||
"max_tokens": max_tokens,
|
||||
"temperature": temperature
|
||||
"sampling_params": { # ★ 同样改这里 ★
|
||||
"max_new_tokens": int(max_tokens),
|
||||
"temperature": temperature
|
||||
}
|
||||
}
|
||||
|
||||
print(f"\n🔵 [{now()} test] payload:\n{json.dumps(payload, ensure_ascii=False, indent=2)}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue