fix
This commit is contained in:
parent
39143e1998
commit
d90052cfd1
3 changed files with 1 additions and 16 deletions
|
|
@ -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