diff --git a/deepgram/_types.py b/deepgram/_types.py index db63d3de..8ef4b3b3 100644 --- a/deepgram/_types.py +++ b/deepgram/_types.py @@ -78,6 +78,7 @@ class TranscriptionOptions(TypedDict, total=False): measurements: bool smart_format: bool replace: str + tag: List[str] class PrerecordedOptions(TranscriptionOptions, total=False): @@ -93,6 +94,7 @@ class PrerecordedOptions(TranscriptionOptions, total=False): detect_topics: bool translate: List[str] analyze_sentiment: bool + sentiment: bool sentiment_threshold: float diff --git a/deepgram/keys.py b/deepgram/keys.py index 9953a9c4..65b479e0 100644 --- a/deepgram/keys.py +++ b/deepgram/keys.py @@ -1,7 +1,7 @@ from typing import List from ._types import Options, Key, KeyResponse from ._utils import _request - +import datetime class Keys: _root = "/projects" @@ -22,12 +22,12 @@ async def get(self, project_id: str, key: str) -> Key: ) async def create( - self, project_id: str, comment: str, scopes: List[str] + self, project_id: str, comment: str, scopes: List[str], tags: List[str], expiration_date: datetime, time_to_live_in_seconds: int ) -> Key: """Creates an API key with the provided scopes.""" return await _request( f'{self._root}/{project_id}/keys', self.options, - method='POST', payload={'comment': comment, 'scopes': scopes}, + method='POST', payload={'comment': comment, 'scopes': scopes, 'tags': tags, 'expiration_date': expiration_date, 'time_to_live_in_seconds': time_to_live_in_seconds}, headers={'Content-Type': 'application/json'} )