Test DeepSeek AI

Signed-off-by: Yasir Aris M <git@yasir.id>
This commit is contained in:
Yasir Aris M 2026-01-05 15:28:34 +07:00 committed by GitHub
parent 326b17995f
commit 8e5b15af13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,7 @@ async def get_openai_stream_response(is_stream, key, base_url, model, messages,
disable_web_page_preview=True,
)
else:
await bmsg.edit_msg(f"{html.escape(answer)}\n\n<b>Powered by:</b> <code>GPT 5</code>")
await bmsg.edit_msg(f"{html.escape(answer)}\n\n<b>Powered by:</b> <code>DeepSeek</code>")
except APIConnectionError as e:
await bmsg.edit_msg(f"The server could not be reached because {e.__cause__}")
return None
@ -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://models.inference.ai.azure.com", "gpt-5-mini", gptai_conversations[uid], msg, strings)
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)
if not ai_response:
gptai_conversations[uid].pop()
if len(gptai_conversations[uid]) == 1:
@ -143,3 +143,4 @@ async def openai_chatbot(self, ctx: Message, strings):
gptai_conversations[uid].append({"role": "assistant", "content": ai_response})