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
First off, this is a really well done project. Thank you for all your work.
There is one feature missing that is preventing me from fully scratching my current OAI bits and moving to this project.
I have an OAI service, but I have added new behavior to the SSE event stream to augment the information sent back in the streaming response. Besides just using the data: field in the SSE stream, I use SSE events and comments to provide a more rich description of the server-side state.
With this method, you can provide an event handler, which could handle event:, etc.
In my specific case, my output stream would be an Annotated where all the sole data: message are O and all the events and other bits are wrapped by the Annotated wrapper. Your abstractions already allow get/post to be generic with respect to O.
Would you be willing to extend the client functionality to provide more custom SSE handling?
First off, this is a really well done project. Thank you for all your work.
There is one feature missing that is preventing me from fully scratching my current OAI bits and moving to this project.
I have an OAI service, but I have added new behavior to the SSE event stream to augment the information sent back in the streaming response. Besides just using the data: field in the SSE stream, I use SSE events and comments to provide a more rich description of the server-side state.
You already have the abstractions needed:
https://github.com/64bit/async-openai/blob/main/async-openai/src/client.rs#L493
With this method, you can provide an event handler, which could handle event:, etc.
In my specific case, my output stream would be an Annotated where all the sole data: message are O and all the events and other bits are wrapped by the Annotated wrapper. Your abstractions already allow get/post to be generic with respect to O.
Would you be willing to extend the client functionality to provide more custom SSE handling?
What would this look like? I'm not entirely sure. Initially, we could make this method fully public:
https://github.com/64bit/async-openai/blob/main/async-openai/src/client.rs#L402
Later, we could decide if/how to use the trait system.
Thoughts?
The text was updated successfully, but these errors were encountered: