This commit is contained in:
thedragonsinn
2025-01-27 15:41:49 +05:30
parent 6d865af2f6
commit 84c17d4d5f

View File

@@ -3,7 +3,7 @@ from pyrogram.enums import ParseMode
from app import BOT, LOGGER, Message
from app.extra_config import OPENAI_CLIENT, OPENAI_MODEL
from app.plugins.ai.models import SYSTEM_INSTRUCTIONS
from app.plugins.ai.models import SYSTEM_INSTRUCTION
try:
CLIENT = getattr(openai, f"Async{OPENAI_CLIENT}OpenAI")()
@@ -51,7 +51,7 @@ async def chat_gpt(bot: BOT, message: Message):
chat_completion = await CLIENT.chat.completions.create(
messages=[
{"role": "system", "content": SYSTEM_INSTRUCTIONS},
{"role": "system", "content": SYSTEM_INSTRUCTION},
{"role": "user", "content": prompt},
],
model=OPENAI_MODEL,