diff --git a/ollama-rs/src/generation/tools/mod.rs b/ollama-rs/src/generation/tools/mod.rs index 4eb9e47..b83dd0c 100644 --- a/ollama-rs/src/generation/tools/mod.rs +++ b/ollama-rs/src/generation/tools/mod.rs @@ -25,7 +25,7 @@ pub trait Tool: Send + Sync { fn call( &mut self, parameters: Self::Params, - ) -> impl Future> + Send + Sync; + ) -> impl Future> + Send; } pub trait Parameters: DeserializeOwned + JsonSchema {} @@ -36,14 +36,14 @@ pub(crate) trait ToolHolder: Send + Sync { fn call( &mut self, parameters: Value, - ) -> Pin> + '_ + Send + Sync>>; + ) -> Pin> + '_ + Send>>; } impl ToolHolder for T { fn call( &mut self, parameters: Value, - ) -> Pin> + '_ + Send + Sync>> { + ) -> Pin> + '_ + Send>> { Box::pin(async move { // Json returned from the model can sometimes be in different formats, see https://github.com/pepperoni21/ollama-rs/issues/210 // This is a work-around for this issue.