From 0b45e8666e71d23ac5fc666e140baa42553b1fd6 Mon Sep 17 00:00:00 2001 From: ViperEkura <3081035982@qq.com> Date: Sun, 9 Nov 2025 16:30:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(scripts):=20=E4=BF=AE=E5=A4=8Dstream=5Fchat?= =?UTF-8?q?.py=E4=B8=AD=E7=9A=84=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/stream_chat.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/stream_chat.py b/scripts/stream_chat.py index 112720d..deabc5c 100644 --- a/scripts/stream_chat.py +++ b/scripts/stream_chat.py @@ -10,16 +10,16 @@ def chat(): model_dir = os.path.join(PROJECT_ROOT, "params") model = Khaosz(model_dir).to(device='cuda', dtype=torch.bfloat16) - histroy = [] + history = [] while True: query = input(">> ") if query == "!exit": break response_size = 0 - for response, histroy in model.stream_generate( + for response, history in model.stream_generate( query=query, - history=histroy, + history=history, temperature=0.8, top_p=0.95, top_k=50