From 1885ec23e4e1ae0369cfc959e6071914109eab57 Mon Sep 17 00:00:00 2001 From: Brian Barrow Date: Tue, 20 Jun 2023 14:30:37 -0600 Subject: [PATCH 1/3] changed summarize to be string instead of boolean to support new v2 --- deepgram/_types.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deepgram/_types.py b/deepgram/_types.py index 141e7365..0e829c3f 100644 --- a/deepgram/_types.py +++ b/deepgram/_types.py @@ -89,7 +89,7 @@ class PrerecordedOptions(TranscriptionOptions, total=False): utterances: bool utt_split: float detect_entities: bool - summarize: bool + summarize: str paragraphs: bool detect_language: bool detect_topics: bool @@ -216,11 +216,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[Dict[str, Any]] }) @@ -365,7 +367,7 @@ class UsageOptions(TypedDict, total=False): alternatives: bool numerals: bool detect_entities: bool - summarize: bool + summarize: str paragraphs: bool detect_language: bool detect_topics: bool From 1fb2dcf6757c096dd0a88a6d7e294ca78f2e3770 Mon Sep 17 00:00:00 2001 From: Saarth Shah <69341449+SaarthShah@users.noreply.github.com> Date: Thu, 22 Jun 2023 16:31:36 -0400 Subject: [PATCH 2/3] fixed class types for the request --- deepgram/_types.py | 9 ++++++--- package-lock.json | 6 ++++++ package.json | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json diff --git a/deepgram/_types.py b/deepgram/_types.py index 0e829c3f..3cdd1a92 100644 --- a/deepgram/_types.py +++ b/deepgram/_types.py @@ -89,7 +89,7 @@ class PrerecordedOptions(TranscriptionOptions, total=False): utterances: bool utt_split: float detect_entities: bool - summarize: str + summarize: Union[int, str] paragraphs: bool detect_language: bool detect_topics: bool @@ -208,6 +208,9 @@ class Utterance(TypedDict): id: str +class SummaryV2(TypedDict): + short: str + class Metadata(TypedDict): request_id: str transaction_key: str @@ -222,7 +225,7 @@ class Metadata(TypedDict): TranscriptionResults = TypedDict('TranscriptionResults', { 'channels': List[Channel], 'utterances': Optional[List[Utterance]], - 'summary': Optional[Dict[str, Any]] + 'summary': Optional[SummaryV2], }) @@ -367,7 +370,7 @@ class UsageOptions(TypedDict, total=False): alternatives: bool numerals: bool detect_entities: bool - summarize: str + summarize: Union[int, str] paragraphs: bool detect_language: bool detect_topics: bool diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..a74cb0df --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "deepgram-python-sdk", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/package.json @@ -0,0 +1 @@ +{} From 0616d00c0995525331920d4026550a7c5159298a Mon Sep 17 00:00:00 2001 From: Saarth Shah <69341449+SaarthShah@users.noreply.github.com> Date: Fri, 23 Jun 2023 09:21:30 -0400 Subject: [PATCH 3/3] fixed type error and removed node package files --- deepgram/_types.py | 4 ++-- package-lock.json | 6 ------ package.json | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/deepgram/_types.py b/deepgram/_types.py index 3cdd1a92..cf2d1c63 100644 --- a/deepgram/_types.py +++ b/deepgram/_types.py @@ -89,7 +89,7 @@ class PrerecordedOptions(TranscriptionOptions, total=False): utterances: bool utt_split: float detect_entities: bool - summarize: Union[int, str] + summarize: Union[bool, str] paragraphs: bool detect_language: bool detect_topics: bool @@ -370,7 +370,7 @@ class UsageOptions(TypedDict, total=False): alternatives: bool numerals: bool detect_entities: bool - summarize: Union[int, str] + summarize: Union[bool, str] paragraphs: bool detect_language: bool detect_topics: bool diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index a74cb0df..00000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "deepgram-python-sdk", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} diff --git a/package.json b/package.json deleted file mode 100644 index 0967ef42..00000000 --- a/package.json +++ /dev/null @@ -1 +0,0 @@ -{}