-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[8/n] Make realtime more like the rest of agents sdk #1076
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
Conversation
e0f956b
to
4cb44e9
Compare
ui_task = asyncio.create_task(self.ui.run_async()) | ||
|
||
# Set up session immediately without waiting for UI to finish | ||
runner = RealtimeRunner(agent) |
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.
the normal runner takes the agent as a parameter to run, why use constructor for realtime?
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.
A common use case is that your Runner is the same, but you want to launch many different long-lived connections with the same config. This lets you do that without needing to re-specify the agent each time.
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.
But that's true even with a normal runner/agent. Do you think this use case is worth the inconsistency?
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.
Yeah i think it'll be super common with realtime. regular Runner is static so this wasn't really a consideration there
pass | ||
|
||
@abc.abstractmethod | ||
async def send_event(self, event: RealtimeClientMessage) -> None: |
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.
can we make this private?
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.
Specifically wanted to make this public to allow arbitrary events
0590c72
to
bd4e8f9
Compare
Key changes: 1. Transport -> model. 2. Extract any model settings into `RealtimeSessionModelSettings`. 3. RealtimeRunConfig, similar to the RunConfig in `run.py`. Next PR I'll update session to be better.
Key changes:
RealtimeSessionModelSettings
.run.py
.