-
Notifications
You must be signed in to change notification settings - Fork 552
feat: multi turn streaming example #413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: multi turn streaming example #413
Conversation
Great job spearheading this, I was looking to add some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @JazzyMcJazz, we recently merged a large PR (#440) that will probably change some of the implementation details for the example:
- StreamingCompletionModel is now folded into CompletionModel
- You'll probably need to import rig::completion::CompletionClient and rig::completion::ProviderClient
- There seems to be a new lint for the error type because all of the enum variants have the same postfix
If you need help updating the example so it is compliant with the new changes, let me know!
|
Hi @joshua-mo-143, thank you for letting me know. I have updated the example to use the new traits.
Can you elaborate on this if it is still an issue? I am unsure if there is something I should change. |
Should be fine, I think. There was an error in the release pipeline because we'd added a new crate that used some new breaking changes from |
joshua-mo-143
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - looks great!
Closes #412
Small change, that enables calling
agent.stream_competion(...).await?.stream().await?;insideBox::pin(async_stream::stream! { ... });.The implementation hopefully handles
wasm32arch.I have added a
multi_turn_streaming.rsexample. It is based on the previous version of themulti_turn_agent.rsexample.I considered implementing multi turn functionality like the new
PromptRequestimplementation, but it seemed too daunting a task, and this simple change enables for customised multi turn logic.