Updated model names
This commit is contained in:
@@ -18,8 +18,8 @@ client = OpenAI(
|
||||
api_key=os.environ.get("OPENAI_API_KEY"),
|
||||
)
|
||||
|
||||
GPT_4O = "gpt-4"
|
||||
GPT_4O_MINI = "gpt-4-1106-preview"
|
||||
GPT_4O = "gpt-4o"
|
||||
GPT_4O_MINI = "gpt-4o-mini"
|
||||
|
||||
model_max_tokens = {
|
||||
GPT_4O: 4096,
|
||||
@@ -116,6 +116,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
|
||||
tool_calls.append(assistant_message.function_call)
|
||||
|
||||
toolUseCount = 0
|
||||
previous_function_name = ""
|
||||
|
||||
while len(tool_calls) > 0 and toolUseCount < 50 and processing_status[user_id]["processing"]:
|
||||
tool_use_results = []
|
||||
@@ -123,8 +124,10 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
|
||||
tool_call = tool_calls.pop(0)
|
||||
function_name = tool_call.name
|
||||
|
||||
if function_name != previous_function_name:
|
||||
# Update status message
|
||||
await update_status_message(context, update.effective_chat.id, status_message.message_id, f"Using tool: {function_name}")
|
||||
previous_function_name = function_name
|
||||
|
||||
tool_response = call_tool(tool_call)
|
||||
tool_use_results.append({"role": "function", "name": function_name, "content": json.dumps(tool_response)})
|
||||
|
||||
Reference in New Issue
Block a user