fix: sleep time min for llama

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong0618 2024-04-19 16:54:14 +08:00
parent 450c08ba54
commit da8e0b809d

View File

@ -133,7 +133,8 @@ def llama_pro_handler(message: Message, bot: TeleBot) -> None:
if chunk.choices[0].delta.content is None: if chunk.choices[0].delta.content is None:
break break
s += chunk.choices[0].delta.content s += chunk.choices[0].delta.content
if time.time() - start > 2.0: # 0.7 is enough for llama3 here its very fast
if time.time() - start > 0.7:
start = time.time() start = time.time()
bot_reply_markdown(reply_id, who, s, bot, split_text=False) bot_reply_markdown(reply_id, who, s, bot, split_text=False)