Skip to content

Commit 5eff0ac

Browse files
Merge pull request #96 from SaarthShah/summarize-v2
Fixed class types for the request
2 parents 1885ec2 + 0616d00 commit 5eff0ac

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

deepgram/_types.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class PrerecordedOptions(TranscriptionOptions, total=False):
8989
utterances: bool
9090
utt_split: float
9191
detect_entities: bool
92-
summarize: str
92+
summarize: Union[bool, str]
9393
paragraphs: bool
9494
detect_language: bool
9595
detect_topics: bool
@@ -208,6 +208,9 @@ class Utterance(TypedDict):
208208
id: str
209209

210210

211+
class SummaryV2(TypedDict):
212+
short: str
213+
211214
class Metadata(TypedDict):
212215
request_id: str
213216
transaction_key: str
@@ -222,7 +225,7 @@ class Metadata(TypedDict):
222225
TranscriptionResults = TypedDict('TranscriptionResults', {
223226
'channels': List[Channel],
224227
'utterances': Optional[List[Utterance]],
225-
'summary': Optional[Dict[str, Any]]
228+
'summary': Optional[SummaryV2],
226229
})
227230

228231

@@ -367,7 +370,7 @@ class UsageOptions(TypedDict, total=False):
367370
alternatives: bool
368371
numerals: bool
369372
detect_entities: bool
370-
summarize: str
373+
summarize: Union[bool, str]
371374
paragraphs: bool
372375
detect_language: bool
373376
detect_topics: bool

0 commit comments

Comments
 (0)