mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-04-29 00:27:09 +08:00
fix: sleep time min for llama
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
450c08ba54
commit
da8e0b809d
@ -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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user