-
Notifications
You must be signed in to change notification settings - Fork 104
fix(agent): move mip_opt_out field to root level of SettingsOptions #561
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
The mip_opt_out field was incorrectly placed inside the agent object, but according to the Deepgram API specification, it should be at the root level of the Settings message payload. This was causing the API to return: 'Error parsing client message. Check the agent.mip_opt_out field against the API spec.' - Moved mip_opt_out from Agent class to SettingsOptions class - Updated all unit tests to reference the new location - Verified serialization now matches API spec: mip_opt_out at $message.payload#/mip_opt_out
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
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.pytests/unit_test/test_unit_agent_mip_opt_out.pytests/unit_test/test_unit_agent_tags.pyNote ⚡️ 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 (3)
🧰 Additional context used🧠 Learnings (4)📓 Common learnings
tests/unit_test/test_unit_agent_mip_opt_out.py (1)Learnt from: jpvajda tests/unit_test/test_unit_agent_tags.py (1)Learnt from: jpvajda deepgram/clients/agent/v1/websocket/options.py (10)Learnt from: jpvajda Learnt from: dvonthenen Learnt from: dvonthenen Learnt from: dvonthenen Learnt from: dvonthenen Learnt from: dvonthenen Learnt from: dvonthenen Learnt from: dvonthenen Learnt from: dvonthenen Learnt from: dvonthenen 🧬 Code Graph Analysis (1)tests/unit_test/test_unit_agent_mip_opt_out.py (2)
🔇 Additional comments (7)
✨ 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 (
|
Proposed changes
The mip_opt_out field was incorrectly placed inside the agent object, but according to the Deepgram API specification, it should be at the root level of the Settings message payload.
This was causing the API to return: 'Error parsing client message. Check the agent.mip_opt_out field against the API spec.'
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.Further comments
Summary by CodeRabbit