style: format rebased conflict resolutions
This commit is contained in:
parent
3522d51f98
commit
128e888d7a
2 changed files with 9 additions and 11 deletions
|
|
@ -1399,8 +1399,8 @@ mod tests {
|
||||||
use crate::providers::Provider;
|
use crate::providers::Provider;
|
||||||
use crate::tools::{Tool, ToolResult};
|
use crate::tools::{Tool, ToolResult};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use std::sync::Arc;
|
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
use std::sync::Arc;
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
@ -1974,20 +1974,16 @@ Done."#;
|
||||||
.iter()
|
.iter()
|
||||||
.any(|m| m.role == "user" && m.content.contains("[Tool parser error]"))
|
.any(|m| m.role == "user" && m.content.contains("[Tool parser error]"))
|
||||||
{
|
{
|
||||||
return Ok(
|
return Ok(r#"<tool_call>
|
||||||
r#"<tool_call>
|
|
||||||
{"name":"shell","arguments":{"command":"echo fixed"}}
|
{"name":"shell","arguments":{"command":"echo fixed"}}
|
||||||
</tool_call>"#
|
</tool_call>"#
|
||||||
.to_string(),
|
.to_string());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(
|
Ok(r#"<tool_call>
|
||||||
r#"<tool_call>
|
|
||||||
{"name":"shell","arguments":{"command":"echo "$rss $name ($pid)""}}
|
{"name":"shell","arguments":{"command":"echo "$rss $name ($pid)""}}
|
||||||
</tool_call>"#
|
</tool_call>"#
|
||||||
.to_string(),
|
.to_string())
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2036,7 +2032,10 @@ Done."#;
|
||||||
runs: Arc::clone(&runs),
|
runs: Arc::clone(&runs),
|
||||||
})];
|
})];
|
||||||
|
|
||||||
let mut history = vec![ChatMessage::system("sys"), ChatMessage::user("check memory")];
|
let mut history = vec![
|
||||||
|
ChatMessage::system("sys"),
|
||||||
|
ChatMessage::user("check memory"),
|
||||||
|
];
|
||||||
|
|
||||||
let response = run_tool_call_loop(
|
let response = run_tool_call_loop(
|
||||||
&MalformedThenValidToolProvider,
|
&MalformedThenValidToolProvider,
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ impl DingTalkChannel {
|
||||||
let gw: GatewayResponse = resp.json().await?;
|
let gw: GatewayResponse = resp.json().await?;
|
||||||
Ok(gw)
|
Ok(gw)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue