generated from deepgram/oss-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Description
What is the current behavior?
In the code snippet:
from deepgram import PrerecordedOptions
# It's working
print('Case 1')
options = PrerecordedOptions()
options.custom_topic = '...'
# It's not working
print('Case 2')
options = PrerecordedOptions(custom_topic = '...')Case 1 works as expected, but Case 2 raises a TypeError because PrerecordedOptions.__init__() received an unexpected keyword argument 'custom_topic'.
Steps to reproduce
- Import
PrerecordedOptionsfrom thedeepgrammodule. - Execute
Case 1wherecustom_topicis set as an attribute after instantiation. - Execute
Case 2wherecustom_topicis passed as a keyword argument during instantiation.
Expected behavior
PrerecordedOptions should accept custom_topic as a keyword argument during instantiation, or the attribute should be set correctly after instantiation.
Please tell us about your environment
- Operating System/Version: Windows 10
- Python Version: v3.11
Other information
It appears that PrerecordedOptions does not support setting custom_topic via a keyword argument during initialization, but allows setting it as an attribute after instantiation.
davidvonthenen
Metadata
Metadata
Assignees
Labels
No labels