forked from kent/consciousness
WIP: Fix Arc::new() wrapping on tool handlers — some import/paren issues remain
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
12798eeae2
commit
daba424a46
9 changed files with 16 additions and 16 deletions
|
|
@ -9,13 +9,13 @@ pub fn tools() -> [super::Tool; 2] {
|
|||
name: "web_fetch",
|
||||
description: "Fetch content from a URL and return it as text. Use for reading web pages, API responses, documentation.",
|
||||
parameters_json: r#"{"type":"object","properties":{"url":{"type":"string","description":"The URL to fetch"}},"required":["url"]}"#,
|
||||
handler: Arc::new(|_a, v| Box::pin(async move { web_fetch(&v).await }),
|
||||
handler: Arc::new(|_a, v| Box::pin(async move { web_fetch(&v).await })),
|
||||
},
|
||||
super::Tool {
|
||||
name: "web_search",
|
||||
description: "Search the web and return results. Use for finding documentation, looking up APIs, researching topics.",
|
||||
parameters_json: r#"{"type":"object","properties":{"query":{"type":"string","description":"The search query"},"num_results":{"type":"integer","description":"Number of results to return (default 5)"}},"required":["query"]}"#,
|
||||
handler: Arc::new(|_a, v| Box::pin(async move { web_search(&v).await }),
|
||||
handler: Arc::new(|_a, v| Box::pin(async move { web_search(&v).await })),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue