-
Notifications
You must be signed in to change notification settings - Fork 104
fix: moves agent tags to settings #562
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
Caution Review failedThe pull request is closed. WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ExampleScript
participant SettingsOptions
participant AgentWebsocketClient
User->>ExampleScript: Run script
ExampleScript->>SettingsOptions: Create instance with tags
ExampleScript->>AgentWebsocketClient: Initialize with SettingsOptions (tags included)
AgentWebsocketClient->>AgentWebsocketClient: Connect and handle events
AgentWebsocketClient-->>ExampleScript: Emit events (open, data, welcome, etc.)
ExampleScript-->>User: Print event data and tags
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15–20 minutes Possibly related PRs
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Pylint (3.3.7)deepgram/clients/agent/v1/websocket/options.pyexamples/agent/tags/main.pytests/daily_test/test_daily_agent_websocket.py
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (10)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
PR Summary: Fix Agent Tags Implementation - Move to Top-Level Settings
TL;DR
Fixed Agent Tags location to comply with AsyncAPI specification. Moved
tags
fromoptions.agent.tags
tooptions.tags
as a top-level property inSettingsOptions
.Problem
Agent Tags were incorrectly implemented as a nested property under the
agent
object (options.agent.tags
), but the AsyncAPI specification clearly definestags
as a top-level property alongsidetype
,experimental
,audio
, andagent
.Incorrect Structure (Before):
Correct Structure (After):
Solution
tags
field fromAgent
class toSettingsOptions
class as top-level propertyoptions.tags
instead ofoptions.agent.tags
Files Changed
deepgram/clients/agent/v1/websocket/options.py
- Core implementation fixtests/unit_test/test_unit_agent_tags.py
- Updated all 12 unit teststests/daily_test/test_daily_agent_websocket.py
- Updated integration testsAPI Change
Before (Incorrect):
After (Correct):
Validation
Non- Breaking Change Notice
This is not a breaking change for existing users of Agent Tags.
Since this was incorrectly introduced in PR #559 and doesn't work as implemented.
Impact
Types of changes
What types of changes does your code introduce to the community Python SDK?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Summary by CodeRabbit
New Features
Bug Fixes
Tests