mirror of
https://github.com/tcsenpai/multi1.git
synced 2025-06-06 02:55:21 +00:00
added 10 as max thinking step limit
This commit is contained in:
parent
e216cf8568
commit
213bd49ce8
@ -37,7 +37,7 @@ def generate_response(prompt, api_handler):
|
|||||||
|
|
||||||
messages.append({"role": "assistant", "content": json.dumps(step_data)})
|
messages.append({"role": "assistant", "content": json.dumps(step_data)})
|
||||||
print("Next reasoning step: ", step_data["next_action"])
|
print("Next reasoning step: ", step_data["next_action"])
|
||||||
if step_data["next_action"].lower().strip() == "final_answer":
|
if step_data["next_action"].lower().strip() == "final_answer" or step_count > 10: # Prevents infinite loops in case of errors.
|
||||||
break
|
break
|
||||||
|
|
||||||
step_count += 1
|
step_count += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user