mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-01 10:34:51 +00:00
Revert force html, since from openai is mixed with markdown
Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
parent
593527f5a7
commit
024f825fba
1 changed files with 3 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ import html
|
|||
import random
|
||||
|
||||
from openai import AsyncOpenAI, APIConnectionError, RateLimitError, APIStatusError
|
||||
from pyrogram import filters, enums
|
||||
from pyrogram import filters
|
||||
from pyrogram.errors import MessageTooLong
|
||||
from pyrogram.types import Message
|
||||
|
||||
|
|
@ -73,10 +73,10 @@ async def openai_chatbot(_, ctx: Message, strings):
|
|||
num += 1
|
||||
answer += chunk.choices[0].delta.content
|
||||
if num == 30:
|
||||
await msg.edit_msg(html.escape(answer), parse_mode=enums.ParseMode.HTML)
|
||||
await msg.edit_msg(html.escape(answer))
|
||||
await asyncio.sleep(1.5)
|
||||
num = 0
|
||||
await msg.edit_msg(html.escape(answer), parse_mode=enums.ParseMode.HTML)
|
||||
await msg.edit_msg(html.escape(answer))
|
||||
except MessageTooLong:
|
||||
answerlink = await post_to_telegraph(
|
||||
False, "MissKaty ChatBot ", html.escape(f"<code>{answer}</code>")
|
||||
|
|
|
|||
Loading…
Reference in a new issue