From 3735cc0c74f79a2e857448a44492fa84c633e43a Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Mon, 9 Jun 2025 15:41:48 -0700 Subject: [PATCH] feat: support context length option --- deepgram/clients/agent/v1/websocket/options.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deepgram/clients/agent/v1/websocket/options.py b/deepgram/clients/agent/v1/websocket/options.py index ffdaa5c1..9abca2d1 100644 --- a/deepgram/clients/agent/v1/websocket/options.py +++ b/deepgram/clients/agent/v1/websocket/options.py @@ -2,7 +2,7 @@ # Use of this source code is governed by a MIT license that can be found in the LICENSE file. # SPDX-License-Identifier: MIT -from typing import List, Optional, Union, Any, Tuple, Dict +from typing import List, Optional, Union, Any, Tuple, Dict, Literal import logging from dataclasses import dataclass, field @@ -150,6 +150,9 @@ class Think(BaseResponse): prompt: Optional[str] = field( default=None, metadata=dataclass_config(exclude=lambda f: f is None) ) + context_length: Optional[Union[int, Literal["max"]]] = field( + default=None, metadata=dataclass_config(exclude=lambda f: f is None) + ) def __post_init__(self): if not isinstance(self.provider, Provider):