-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Description
Overview
Currently the future returned by Tool::call requires Sync:
pub trait Tool: Send + Sync {
fn call(
&mut self,
parameters: Self::Params,
) -> impl Future<Output = Result<String>> + Send + Sync;
}https://docs.rs/ollama-rs/latest/ollama_rs/generation/tools/trait.Tool.html
Does this future actually need to be Sync or can it just be Send?
Cause of issue
Using bollard::Docker::start_exec I get a stream with the type Pin<Box<dyn Stream<Item = Result<LogOutput, Error>> + Send>>
Because this type is not Sync I can't call it from a Tool implementation without jumping through hoops.
https://docs.rs/bollard/0.19.4/bollard/exec/enum.StartExecResults.html#variant.Attached.field.output
Metadata
Metadata
Assignees
Labels
No labels