Skip to content

Commit ad6fa25

Browse files
Merge pull request #94 from deepgram/summarize-v2
changed summarize to be string instead of boolean to support new v2
2 parents eca50c1 + 5eff0ac commit ad6fa25

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

deepgram/_types.py

Lines changed: 8 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: bool
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
@@ -216,11 +219,13 @@ class Metadata(TypedDict):
216219
duration: float
217220
channels: int
218221
models: List[str]
222+
model_info: Dict[str, Any]
219223

220224

221225
TranscriptionResults = TypedDict('TranscriptionResults', {
222226
'channels': List[Channel],
223-
'utterances': Optional[List[Utterance]]
227+
'utterances': Optional[List[Utterance]],
228+
'summary': Optional[SummaryV2],
224229
})
225230

226231

@@ -365,7 +370,7 @@ class UsageOptions(TypedDict, total=False):
365370
alternatives: bool
366371
numerals: bool
367372
detect_entities: bool
368-
summarize: bool
373+
summarize: Union[bool, str]
369374
paragraphs: bool
370375
detect_language: bool
371376
detect_topics: bool

0 commit comments

Comments
 (0)