Skip to content

Commit 1fb2dcf

Browse files
committed
fixed class types for the request
1 parent 1885ec2 commit 1fb2dcf

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-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[int, 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[int, str]
371374
paragraphs: bool
372375
detect_language: bool
373376
detect_topics: bool

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)