mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 09:44:50 +00:00
Test gpt4o
Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
parent
a134febf8d
commit
4dee501c8f
1 changed files with 2 additions and 2 deletions
|
|
@ -65,14 +65,14 @@ async def openai_chatbot(_, ctx: Message, strings):
|
|||
is_in_gap, _ = await check_time_gap(uid)
|
||||
if is_in_gap and (uid not in SUDO):
|
||||
return await ctx.reply_msg(strings("dont_spam"), del_in=5)
|
||||
ai = AsyncOpenAI(api_key=OPENAI_KEY)
|
||||
ai = AsyncOpenAI(api_key=OPENAI_KEY, base_url="https://api.aimlapi.com")
|
||||
pertanyaan = ctx.input
|
||||
msg = await ctx.reply_msg(strings("find_answers_str"), quote=True)
|
||||
num = 0
|
||||
answer = ""
|
||||
try:
|
||||
response = await ai.chat.completions.create(
|
||||
model="gpt-3.5-turbo",
|
||||
model="gpt-4o",
|
||||
messages=[{"role": "user", "content": pertanyaan}],
|
||||
temperature=0.7,
|
||||
stream=True,
|
||||
|
|
|
|||
Loading…
Reference in a new issue