Skip to content

Commit f8d0c76

Browse files
marcusolssonAssemblyAI
andauthored
chore: sync sdk code with DeepLearning repo (#122)
Co-authored-by: AssemblyAI <[email protected]>
1 parent 263d5e3 commit f8d0c76

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

assemblyai/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.41.0"
1+
__version__ = "0.41.1"

assemblyai/streaming/v3/client.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,21 @@ def __init__(self, api_host: str, api_key: Optional[str] = None):
286286

287287
def create_temporary_token(
288288
self,
289-
expires_in_seconds: int,
290-
max_session_duration_seconds: int,
289+
expires_in_seconds: Optional[int] = None,
290+
max_session_duration_seconds: Optional[int] = None,
291291
) -> str:
292+
params: Dict[str, Any] = {}
293+
294+
if expires_in_seconds:
295+
params["expires_in_seconds"] = expires_in_seconds
296+
297+
if max_session_duration_seconds:
298+
params["max_session_duration_seconds"] = expires_in_seconds
299+
292300
response = self._http_client.get(
293301
"/v3/token",
294-
params={
295-
"expires_in": expires_in_seconds,
296-
"max_session_duration": max_session_duration_seconds,
297-
},
302+
params=params,
298303
)
304+
299305
response.raise_for_status()
300306
return response.json()["token"]

0 commit comments

Comments
 (0)