You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked for existing issues (including closed) about this
Feature Request
Add Send to fn stream() in the StreamingCompletionModel trait in src/streaming.rs
Motivation
The ability to do multi turn while streaming the response. Currently, attempting to call the stream function inside Box::pin(async_stream::stream! { ... }) causes the follow error:
"impl Future<Output = Result<Pin<Box<...>>, ...>> cannot be sent between threads safely
within AsyncStream<Result<StreamingContent, PromptError>, ...>, the trait std::marker::Send is not implemented for impl Future<Output = Result<Pin<Box<...>>, ...>>"
Feature Request
Add Send to fn stream() in the StreamingCompletionModel trait in src/streaming.rs
Motivation
The ability to do multi turn while streaming the response. Currently, attempting to call the
stream
function insideBox::pin(async_stream::stream! { ... })
causes the follow error:"
impl Future<Output = Result<Pin<Box<...>>, ...>>
cannot be sent between threads safelywithin
AsyncStream<Result<StreamingContent, PromptError>, ...>
, the traitstd::marker::Send
is not implemented forimpl Future<Output = Result<Pin<Box<...>>, ...>>
"Proposal
Change
stream(...) -> impl Future<Output = Result<StreamingResult, CompletionError>>;
To
stream(...) -> impl Future<Output = Result<StreamingResult, CompletionError>> + Send;
Alternatives
None that I can think of.
The text was updated successfully, but these errors were encountered: