fix
This commit is contained in:
parent
39143e1998
commit
d90052cfd1
3 changed files with 1 additions and 16 deletions
|
|
@ -28,7 +28,6 @@ impl Agent {
|
|||
answer tool once you to give your final answer. current date is {}",
|
||||
Utc::now().format("%B %d, %Y %H:%M:%S UTC").to_string()
|
||||
);
|
||||
println!("initial_message: {}", intro);
|
||||
let messages = vec![
|
||||
Message {
|
||||
role: "system".to_string(),
|
||||
|
|
@ -63,7 +62,6 @@ impl Agent {
|
|||
}
|
||||
|
||||
fn log(&mut self, message: &str) {
|
||||
println!("{}", message);
|
||||
self.logs.push_str(message);
|
||||
self.logs.push('\n');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,11 +51,6 @@ pub async fn handle_tool_call(
|
|||
let args: HashMap<String, String> = serde_json::from_str(&tool_call.function.arguments)?;
|
||||
let query = args.get("query").ok_or("Missing query argument")?;
|
||||
|
||||
println!(
|
||||
"--- Executing tool: google_search(query: \"{}\") ---",
|
||||
query
|
||||
);
|
||||
|
||||
let search_result = if let Some(key) = tavily_api_key {
|
||||
match api::perform_search(query, key).await {
|
||||
Ok(results) => results,
|
||||
|
|
@ -69,8 +64,6 @@ pub async fn handle_tool_call(
|
|||
let args: HashMap<String, String> = serde_json::from_str(&tool_call.function.arguments)?;
|
||||
let result = args.get("result").ok_or("Missing result argument")?;
|
||||
|
||||
println!("--- Finishing task: {}", result);
|
||||
|
||||
answer = Some(result.clone());
|
||||
(result.clone(), true)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue