Disabled stream for now because broken
Some checks failed
Notify on Telegram / notify (push) Has been cancelled

Signed-off-by: Yasir Aris M <git@yasir.id>
This commit is contained in:
Yasir Aris M 2026-01-05 16:01:32 +07:00 committed by GitHub
parent ac0b3f332d
commit 051880b2a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -104,7 +104,7 @@ async def gemini_chatbot(_, ctx: Message, strings):
gemini_conversations[uid] = [{"role": "system", "content": "Kamu adalah AI dengan karakter mirip kucing bernama MissKaty AI yang diciptakan oleh Yasir untuk membantu manusia mencari informasi dan gunakan bahasa sesuai yang saya katakan."}, {"role": "user", "content": ctx.input}]
else:
gemini_conversations[uid].append({"role": "user", "content": ctx.input})
ai_response = await get_openai_stream_response(True, GOOGLEAI_KEY, "https://generativelanguage.googleapis.com/v1beta", "gemini-3-flash-preview", gemini_conversations[uid], msg, strings)
ai_response = await get_openai_stream_response(False, GOOGLEAI_KEY, "https://generativelanguage.googleapis.com/v1beta", "gemini-3-flash-preview", gemini_conversations[uid], msg, strings)
if not ai_response:
gemini_conversations[uid].pop()
if len(gemini_conversations[uid]) == 1:
@ -134,7 +134,7 @@ async def openai_chatbot(self, ctx: Message, strings):
gptai_conversations[uid] = [{"role": "system", "content": "Kamu adalah AI dengan karakter mirip kucing bernama MissKaty AI yang diciptakan oleh Yasir untuk membantu manusia mencari informasi dan gunakan bahasa sesuai yang saya katakan."}, {"role": "user", "content": pertanyaan}]
else:
gptai_conversations[uid].append({"role": "user", "content": pertanyaan})
ai_response = await get_openai_stream_response(True, OPENAI_KEY, "https://openrouter.ai/api/v1", "deepseek/deepseek-r1-0528:free", gptai_conversations[uid], msg, strings)
ai_response = await get_openai_stream_response(False, OPENAI_KEY, "https://openrouter.ai/api/v1", "deepseek/deepseek-r1-0528:free", gptai_conversations[uid], msg, strings)
if not ai_response:
gptai_conversations[uid].pop()
if len(gptai_conversations[uid]) == 1:
@ -145,3 +145,4 @@ async def openai_chatbot(self, ctx: Message, strings):