@@ -80,7 +80,7 @@ def __getitem__(self, key):
8080
8181@dataclass_json
8282@dataclass
83- class SummaryV2 :
83+ class SummaryV1 :
8484 summary : Optional [str ] = ""
8585 start_word : Optional [float ] = 0
8686 end_word : Optional [float ] = 0
@@ -92,19 +92,13 @@ def __getitem__(self, key):
9292
9393@dataclass_json
9494@dataclass
95- class Summaries (SummaryV2 ): # internal reference to old name
96- summary : Optional [str ] = ""
97- start_word : Optional [float ] = 0
98- end_word : Optional [float ] = 0
99-
100- def __getitem__ (self , key ):
101- _dict = self .to_dict ()
102- return _dict [key ]
95+ class Summaries (SummaryV1 ): # internal reference to old name
96+ pass
10397
10498
10599@dataclass_json
106100@dataclass
107- class Summary :
101+ class SummaryV2 :
108102 result : Optional [str ] = ""
109103 short : Optional [str ] = ""
110104
@@ -115,13 +109,8 @@ def __getitem__(self, key):
115109
116110@dataclass_json
117111@dataclass
118- class Summary (Summary ): # internal reference to old name
119- result : Optional [str ] = ""
120- short : Optional [str ] = ""
121-
122- def __getitem__ (self , key ):
123- _dict = self .to_dict ()
124- return _dict [key ]
112+ class Summary (SummaryV2 ): # internal reference to old name
113+ pass
125114
126115
127116@dataclass_json
@@ -305,7 +294,7 @@ class Alternative:
305294 transcript : Optional [str ] = ""
306295 confidence : Optional [float ] = 0
307296 words : Optional [List [Word ]] = None
308- summaries : Optional [List [SummaryV2 ]] = None
297+ summaries : Optional [List [SummaryV1 ]] = None
309298 paragraphs : Optional [Paragraphs ] = None
310299 entities : Optional [List [Entity ]] = None
311300 translations : Optional [List [Translation ]] = None
@@ -319,7 +308,7 @@ def __getitem__(self, key):
319308 ]
320309 if _dict ["summaries" ] is not None :
321310 _dict ["summaries" ] = [
322- SummaryV2 .from_dict (summaries )
311+ SummaryV1 .from_dict (summaries )
323312 for _ , summaries in _dict ["summaries" ].items ()
324313 ]
325314 if _dict ["paragraphs" ] is not None :
@@ -346,6 +335,7 @@ class Channel:
346335 search : Optional [List [Search ]] = None
347336 alternatives : Optional [List [Alternative ]] = None
348337 detected_language : Optional [str ] = ""
338+ language_confidence : Optional [float ] = 0
349339
350340 def __getitem__ (self , key ):
351341 _dict = self .to_dict ()
@@ -366,7 +356,7 @@ def __getitem__(self, key):
366356class Result :
367357 channels : Optional [List [Channel ]] = None
368358 utterances : Optional [List [Utterance ]] = None
369- summary : Optional [Summary ] = None
359+ summary : Optional [SummaryV2 ] = None
370360
371361 def __getitem__ (self , key ):
372362 _dict = self .to_dict ()
@@ -380,7 +370,7 @@ def __getitem__(self, key):
380370 for _ , utterances in _dict ["utterances" ].items ()
381371 ]
382372 if _dict ["summary" ] is not None :
383- _dict ["summary" ] = Summary .from_dict (_dict ["summary" ])
373+ _dict ["summary" ] = SummaryV2 .from_dict (_dict ["summary" ])
384374 return _dict [key ]
385375
386376
0 commit comments