Closed as not planned
Description
Confirm this is a feature request for the .NET library and not the underlying OpenAI API
- This is a feature request for the .NET library
Describe the feature or improvement you are requesting
It would be great if we could get an IObservable<ConversationUpdate>
API for RealtimeConversationSession
for use cases where a stateful subscription to an observable makes more sense than using ReceiveUpdatesAsync
. I am currently working around this by using the System.Interactive.Async package and converting the IAsyncEnumerable
to an observable with the code below, but it seems like it possibly could be more efficient if it didn't have to do all the async enumerable stuff under the hood, just to be converted back to an observable. And, that would remove the need for this extra NuGet package.
Workaround:
_streamSubscription = _session.ReceiveUpdatesAsync(cancellationToken) .ToObservable() .Subscribe(update => { ... });
Additional context
No response