Closed bcherry closed 3 weeks ago
Latest commit: d14b2eff44e79e5cb8a9fe1624fa59c0b7d2892c
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
This should essentially make both the core package and the OpenAI plugin feature-complete. Node agents is now capable of powering the realtime playground.
multimodal
namespace in main packageCancellablePromise
andgracefullyCancel
util to mirror asyncio)#
done
flag toFuture
)AsyncIterableQueue
and use it for textStream and audioStream instead of QueueNote on the "main package" move:
I spent a while trying to make circular dependencies work but it ended up being quite difficult and is also explicitly incompatible with turbo.
I ultimately decided that we should punt work on that for now and instead just dropped a couple of abstract top-level types and
any
for some of the underlying stuff and called it a day. Theany
type is exposed to customers only when they acquire the session, which requires a simpleas openai.realtime.RealtimeSession
.The only other downside to this approach is I think it precludes the use of TypedEmitter on RealtimeSession, because then we'd have to define all the messages it produces and their signatures in the main abstract class, which felt like too much.
The other options would be to leave MMA in the OpenAI plugin or get rid of the OpenAI plugin and make it part of the main package. Both options felt worse to me.
Final note: The names of some new emitted events and the base abstract class are subject to change, pending @theomonnom 's final choices in Python.