File tree Expand file tree Collapse file tree 3 files changed +28
-15
lines changed Expand file tree Collapse file tree 3 files changed +28
-15
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class PrerecordedOptions(
4141 custom_intent_mode : Optional [str ] = field (
4242 default = None , metadata = dataclass_config (exclude = lambda f : f is None )
4343 )
44- custom_topics : Optional [Union [List [str ], str ]] = field (
44+ custom_topic : Optional [Union [List [str ], str ]] = field (
4545 default = None , metadata = dataclass_config (exclude = lambda f : f is None )
4646 )
4747 custom_topic_mode : Optional [str ] = field (
Original file line number Diff line number Diff line change @@ -384,10 +384,18 @@ class Details(BaseResponse): # pylint: disable=too-many-instance-attributes
384384
385385 config : Config
386386 usd : float = 0
387- duration : float = 0
388- total_audio : float = 0
389- channels : int = 0
390- streams : int = 0
387+ duration : Optional [float ] = field (
388+ default = None , metadata = dataclass_config (exclude = lambda f : f is None )
389+ )
390+ total_audio : Optional [float ] = field (
391+ default = None , metadata = dataclass_config (exclude = lambda f : f is None )
392+ )
393+ channels : Optional [int ] = field (
394+ default = None , metadata = dataclass_config (exclude = lambda f : f is None )
395+ )
396+ streams : Optional [int ] = field (
397+ default = None , metadata = dataclass_config (exclude = lambda f : f is None )
398+ )
391399 method : str = ""
392400 tier : Optional [str ] = ""
393401 models : List [str ] = field (default_factory = list )
@@ -471,9 +479,14 @@ class Response(BaseResponse):
471479 Response object
472480 """
473481
474- details : Details
482+ details : Optional [Details ] = field (
483+ default = None , metadata = dataclass_config (exclude = lambda f : f is None )
484+ )
475485 code : int = 0
476486 completed : str = ""
487+ message : Optional [str ] = field (
488+ default = None , metadata = dataclass_config (exclude = lambda f : f is None )
489+ )
477490 tts_details : Optional [TTSDetails ] = field (
478491 default = None , metadata = dataclass_config (exclude = lambda f : f is None )
479492 )
Original file line number Diff line number Diff line change @@ -55,30 +55,30 @@ def main():
5555 print ("" )
5656
5757 # get request
58- reqResp = deepgram .manage .v ("1" ).get_usage_request (myId , requestId )
59- if reqResp is None :
58+ getResp = deepgram .manage .v ("1" ).get_usage_request (myId , requestId )
59+ if getResp is None :
6060 print ("No request found" )
6161 else :
62- print (f"GetUsageRequest() - listResp : { listResp } " )
62+ print (f"GetUsageRequest() - getResp : { getResp } " )
6363 print ("" )
6464
6565 # get fields
6666 options : UsageFieldsOptions = {}
67- listResp = deepgram .manage .v ("1" ).get_usage_fields (myId , options )
68- if listResp is None :
67+ listFields = deepgram .manage .v ("1" ).get_usage_fields (myId , options )
68+ if listFields is None :
6969 print (f"UsageFields not found." )
7070 sys .exit (1 )
7171 else :
72- print (f"GetUsageFields Models - listResp : { listResp } " )
72+ print (f"GetUsageFields Models - listFields : { listFields } " )
7373 print ("" )
7474
7575 # list usage
7676 options : UsageSummaryOptions = {}
77- listResp = deepgram .manage .v ("1" ).get_usage_summary (myId , options )
78- if listResp is None :
77+ getSummary = deepgram .manage .v ("1" ).get_usage_summary (myId , options )
78+ if getSummary is None :
7979 print ("UsageSummary not found" )
8080 else :
81- print (f"GetSummary - listResp : { listResp } " )
81+ print (f"GetSummary - getSummary : { getSummary } " )
8282 except Exception as e :
8383 print (f"Exception: { e } " )
8484
You can’t perform that action at this time.
0 commit comments