eval: Port to agent2 (#40704)

Release Notes:

- N/A
This commit is contained in:
Bennet Fenner
2025-10-22 17:55:26 +00:00
committed by GitHub
parent 4a93719b6b
commit c60343af71
22 changed files with 783 additions and 456 deletions
@@ -29,16 +29,19 @@ impl Example for CodeBlockCitations {
async fn conversation(&self, cx: &mut ExampleContext) -> Result<()> {
const FILENAME: &str = "assistant_tool.rs";
cx.push_user_message(format!(
r#"
Show me the method bodies of all the methods of the `Tool` trait in {FILENAME}.
Please show each method in a separate code snippet.
"#
));
// Verify that the messages all have the correct formatting.
let texts: Vec<String> = cx.run_to_end().await?.texts().collect();
let texts: Vec<String> = cx
.prompt(format!(
r#"
Show me the method bodies of all the methods of the `Tool` trait in {FILENAME}.
Please show each method in a separate code snippet.
"#
))
.await?
.texts()
.collect();
let closing_fence = format!("\n{FENCE}");
for text in texts.iter() {