Content-Length: 215885 | pFad | http://github.com/hecrj/icebreaker/commit/49cf60efb9ec9fbf597828e2e2d51f550461a9b8

1E Attempt plan design a couple times before giving up · hecrj/icebreaker@49cf60e · GitHub
Skip to content

Commit

Permalink
Attempt plan design a couple times before giving up
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Feb 15, 2025
1 parent a4ee831 commit 49cf60e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion core/src/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,23 @@ impl Plan {
return Ok(());
};

let plan = design(assistant, history).run(&progress).await?;
let plan = {
let mut attempt = 0;

loop {
log::info!("Designing plan ({attempt})...");

match design(assistant, history).run(&progress).await {
Err(error) if attempt < 3 => {
log::warn!("Plan design failed: {error}");
}
result => break result?,
}

attempt += 1;
}
};

progress.send(Event::Designed(plan.clone())).await;

execute(assistant, history, query, &plan)
Expand Down

0 comments on commit 49cf60e

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/hecrj/icebreaker/commit/49cf60efb9ec9fbf597828e2e2d51f550461a9b8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy