diff --git a/telegram_inference_bot.py b/telegram_inference_bot.py index 87dc92f..7dac149 100644 --- a/telegram_inference_bot.py +++ b/telegram_inference_bot.py @@ -134,7 +134,7 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) -> assistant_message = response.choices[0].message toolUseCount = 0 if hasattr(assistant_message, 'function_call') and assistant_message.function_call: - while hasattr(assistant_message, 'function_call') and assistant_message.function_call and toolUseCount < 10: + while hasattr(assistant_message, 'function_call') and assistant_message.function_call and toolUseCount < 50: # Todo: put amount in env tool_response = call_tool(assistant_message.function_call, messages) conversation_history[user_id].append({"role": "function", "name": assistant_message.function_call.name, "content": json.dumps(tool_response)})