Skip to content

Commit

Permalink
Merge pull request #94 from deepgram/summarize-v2
Browse files Browse the repository at this point in the history
changed summarize to be string instead of boolean to support new v2
  • Loading branch information
SandraRodgers authored Jun 23, 2023
2 parents eca50c1 + 5eff0ac commit ad6fa25
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions deepgram/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class PrerecordedOptions(TranscriptionOptions, total=False):
utterances: bool
utt_split: float
detect_entities: bool
summarize: bool
summarize: Union[bool, str]
paragraphs: bool
detect_language: bool
detect_topics: bool
Expand Down Expand Up @@ -208,6 +208,9 @@ class Utterance(TypedDict):
id: str


class SummaryV2(TypedDict):
short: str

class Metadata(TypedDict):
request_id: str
transaction_key: str
Expand All @@ -216,11 +219,13 @@ class Metadata(TypedDict):
duration: float
channels: int
models: List[str]
model_info: Dict[str, Any]


TranscriptionResults = TypedDict('TranscriptionResults', {
'channels': List[Channel],
'utterances': Optional[List[Utterance]]
'utterances': Optional[List[Utterance]],
'summary': Optional[SummaryV2],
})


Expand Down Expand Up @@ -365,7 +370,7 @@ class UsageOptions(TypedDict, total=False):
alternatives: bool
numerals: bool
detect_entities: bool
summarize: bool
summarize: Union[bool, str]
paragraphs: bool
detect_language: bool
detect_topics: bool
Expand Down

0 comments on commit ad6fa25

Please sign in to comment.