Forgot slice

Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
Yasir Aris M 2024-05-13 13:22:04 +07:00 committed by GitHub
parent da6b6e5a4c
commit 1bc29d25c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,7 +37,7 @@ async def gemini_chatbot(_, ctx: Message, strings):
msg = await ctx.reply_msg(strings("find_answers_str"), quote=True)
try:
response = await fetch.get(
f'https://yasirapi.eu.org/gemini?query={ctx.text.split(maxsplit=1)}'
f'https://yasirapi.eu.org/gemini?query={ctx.text.split(maxsplit=1)[1]}'
)
if not response.json().get("candidates"):
await ctx.reply_msg("⚠️ Sorry, the prompt you sent maybe contains a forbidden word that is not permitted by AI.")