-
Notifications
You must be signed in to change notification settings - Fork 72
[AI-262] Update and refactor example code #153
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
[AI-262] Update and refactor example code #153
Conversation
Updated all examples to follow the modern pattern: - Split into create_agent() and join_call() functions - Use await agent.create_user() for user creation - Use await agent.create_call(call_type, call_id) for call creation - Use cli(AgentLauncher(...)) in main block - Add proper logging imports and logger instances This makes all examples consistent with the openai_realtime_example.py pattern.
|
Cursor Agent can help with this pull request. Just |
|
Caution Review failedThe pull request is closed. WalkthroughThis PR unifies example syntax across the codebase by introducing a CLI-based launcher pattern. All examples are refactored to expose Changes
Sequence DiagramsequenceDiagram
participant CLI
participant AgentLauncher
participant create_agent
participant join_call
participant Agent
participant Call
CLI->>AgentLauncher: cli(AgentLauncher(create_agent, join_call))
AgentLauncher->>create_agent: invoke create_agent(**kwargs)
create_agent->>Agent: initialize with config (LLM, STT, TTS, etc.)
create_agent-->>AgentLauncher: return Agent instance
AgentLauncher->>join_call: invoke join_call(agent, call_type, call_id)
join_call->>Agent: ensure user created via agent.create_user()
join_call->>Agent: create call via agent.create_call(call_type, call_id)
Agent->>Call: establish call connection
join_call->>Call: open_demo()
join_call->>Agent: participate in call (send/receive)
join_call-->>AgentLauncher: complete
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (17)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@cursor and @cursoragent would you be so kind to run uv run python dev.py check and fix any mypy/ruff style issues? thx |
|
Perfect! ✅ I've successfully completed the task! Here's what was done: SummaryRan Issues Fixed:
Results:
Commits:
All changes have been pushed to the branch Learn more about Cursor Agents |
Fixed two ruff linting errors: - F811: Removed duplicate Call import from getstream.video.async_call - F841: Removed unused response variable in create_call method All checks now pass (ruff, mypy, and tests).
This pull request contains changes generated by a Cursor Cloud Agent
Summary by CodeRabbit