parent
9aca4cadf0
commit
7384bcaf40
2 changed files with 605 additions and 1 deletions
|
|
@ -141,6 +141,17 @@ impl Agent {
|
|||
if self.answer.is_some() {
|
||||
finished = true;
|
||||
}
|
||||
|
||||
if !finished {
|
||||
self.messages.push(Message {
|
||||
role: "system".to_string(),
|
||||
content: Some(
|
||||
"continue, use the finish tool to submit your final answer".to_string(),
|
||||
),
|
||||
tool_calls: None,
|
||||
tool_call_id: None,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
self.log("\n--- Execution Finished ---");
|
||||
|
|
@ -148,7 +159,7 @@ impl Agent {
|
|||
}
|
||||
|
||||
pub async fn execute_turn(&mut self) -> AppResult<Message> {
|
||||
let max_sub_turns = 10;
|
||||
let max_sub_turns = 20;
|
||||
let mut sub_turns = 0;
|
||||
|
||||
loop {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue