Changed order of tool parameters, switched over to gpt4o
This commit is contained in:
@@ -128,7 +128,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
|
||||
del user_images[user_id]
|
||||
else:
|
||||
# Call OpenAI API for inference (text-only)
|
||||
response = get_chat_response(client, messages, 16384, GPT_4O_MINI)
|
||||
response = get_chat_response(client, messages, 4096, GPT_4O)
|
||||
|
||||
# Extract the assistant's reply
|
||||
assistant_message = response.choices[0].message
|
||||
@@ -145,7 +145,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
|
||||
})
|
||||
|
||||
# Call API again to get the final response
|
||||
assistant_message = get_chat_response(client, messages, 16384, GPT_4O_MINI).choices[0].message
|
||||
assistant_message = get_chat_response(client, messages, 4096, GPT_4O).choices[0].message
|
||||
if not hasattr(assistant_message, 'function_call') or not assistant_message.function_call:
|
||||
assistant_reply = assistant_message.content
|
||||
conversation_history[user_id].append({"role": "assistant", "content": assistant_reply})
|
||||
|
||||
Reference in New Issue
Block a user