-
Notifications
You must be signed in to change notification settings - Fork 821
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
Async Assistant Streaming Helpers #879
Comments
Thanks for reporting @metaskills. I'll route this one to the relevant team to track as a feature request. |
Thanks for the suggestion @metaskills . Could you provide a more concrete snippet of the code you'd like to write, and what you have to write today? |
Sure, in the Experts.js link there is a UAT test for a contrived product assistant that generates an image using data with code interpreter. Illustrated here and code. This is the "imageFileDone listener" I mentioned above. https://github.com/metaskills/experts/blob/main/test/fixtures/productsTool.js#L48-L53 |
Hi @metaskills I believe all you would need is the Node.js events This will let you async/await on any event emitter. |
Hmm, we offer async/await |
@Ethan-Arrowood I had no idea once offered that. Still thinking it would not work... well, maybe. I would have to rearchitect the interface of all my user-defined events and re-attach them "once" for each run. Sounds odd tho, but wiling to try if that is really the fix. @rattrayalex Those are the assistant methods defined here. My request is for the assistant events defined here. |
Ah, silly me. Thanks very much. We'll look into that… |
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
When using the Assistant Streaming Helpers it is sometimes desirable to have an async/await level of control for the event listener. For example, an
imageFileDone
listener that would move a file to a new destination as part of tools being submitted.Additional context
I am the author of Experts.js (https://github.com/metaskills/experts) and I felt this particular pain point in a few of my projects. I've not heard of other's needs for this behavior. That said, I thought that would be helpful for more context.
https://github.com/metaskills/experts?tab=readme-ov-file#streaming--events
Thanks y'all.
The text was updated successfully, but these errors were encountered: