|
| 1 | +diff --git a/var/folders/5_/tlgrkrq92pv1mxbrp9y7v3h80000gn/T/fern-generate-hQF93B/hume-python-sdk/src/hume/empathic_voice/chat/raw_client.py b/Users/twitchard/dev/fern-config/fern/apis/unioned/.preview/fern-python-sdk/src/hume/empathic_voice/chat/raw_client.py |
| 2 | +index fefee870..ed718e98 100644 |
| 3 | +--- a/var/folders/5_/tlgrkrq92pv1mxbrp9y7v3h80000gn/T/fern-generate-hQF93B/hume-python-sdk/src/hume/empathic_voice/chat/raw_client.py |
| 4 | ++++ b/Users/twitchard/dev/fern-config/fern/apis/unioned/.preview/fern-python-sdk/src/hume/empathic_voice/chat/raw_client.py |
| 5 | +@@ -10,7 +10,6 @@ from ...core.api_error import ApiError |
| 6 | + from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper |
| 7 | + from ...core.request_options import RequestOptions |
| 8 | + from ...core.serialization import convert_and_respect_annotation_metadata |
| 9 | +-from ...core.query_encoder import single_query_encoder |
| 10 | + from ..types.connect_session_settings import ConnectSessionSettings |
| 11 | + from .socket_client import AsyncChatSocketClient, ChatSocketClient |
| 12 | + |
| 13 | +@@ -29,6 +28,7 @@ class RawChatClient: |
| 14 | + self, |
| 15 | + *, |
| 16 | + access_token: typing.Optional[str] = None, |
| 17 | ++ allow_connection: typing.Optional[bool] = None, |
| 18 | + config_id: typing.Optional[str] = None, |
| 19 | + config_version: typing.Optional[int] = None, |
| 20 | + event_limit: typing.Optional[int] = None, |
| 21 | +@@ -50,6 +50,9 @@ class RawChatClient: |
| 22 | + |
| 23 | + For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). |
| 24 | + |
| 25 | ++ allow_connection : typing.Optional[bool] |
| 26 | ++ Allows external connections to this chat via the /connect endpoint. |
| 27 | ++ |
| 28 | + config_id : typing.Optional[str] |
| 29 | + The unique identifier for an EVI configuration. |
| 30 | + |
| 31 | +@@ -103,6 +106,8 @@ class RawChatClient: |
| 32 | + query_params = httpx.QueryParams() |
| 33 | + if access_token is not None: |
| 34 | + query_params = query_params.add("access_token", access_token) |
| 35 | ++ if allow_connection is not None: |
| 36 | ++ query_params = query_params.add("allow_connection", allow_connection) |
| 37 | + if config_id is not None: |
| 38 | + query_params = query_params.add("config_id", config_id) |
| 39 | + if config_version is not None: |
| 40 | +@@ -115,10 +120,18 @@ class RawChatClient: |
| 41 | + query_params = query_params.add("verbose_transcription", verbose_transcription) |
| 42 | + if api_key is not None: |
| 43 | + query_params = query_params.add("api_key", api_key) |
| 44 | +- if session_settings is not None: |
| 45 | +- flattened_params = single_query_encoder("session_settings", session_settings) |
| 46 | +- for param_key, param_value in flattened_params: |
| 47 | +- query_params = query_params.add(param_key, str(param_value)) |
| 48 | ++ if ( |
| 49 | ++ convert_and_respect_annotation_metadata( |
| 50 | ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" |
| 51 | ++ ) |
| 52 | ++ is not None |
| 53 | ++ ): |
| 54 | ++ query_params = query_params.add( |
| 55 | ++ "session_settings", |
| 56 | ++ convert_and_respect_annotation_metadata( |
| 57 | ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" |
| 58 | ++ ), |
| 59 | ++ ) |
| 60 | + ws_url = ws_url + f"?{query_params}" |
| 61 | + headers = self._client_wrapper.get_headers() |
| 62 | + if request_options and "additional_headers" in request_options: |
| 63 | +@@ -150,6 +163,7 @@ class AsyncRawChatClient: |
| 64 | + self, |
| 65 | + *, |
| 66 | + access_token: typing.Optional[str] = None, |
| 67 | ++ allow_connection: typing.Optional[bool] = None, |
| 68 | + config_id: typing.Optional[str] = None, |
| 69 | + config_version: typing.Optional[int] = None, |
| 70 | + event_limit: typing.Optional[int] = None, |
| 71 | +@@ -171,6 +185,9 @@ class AsyncRawChatClient: |
| 72 | + |
| 73 | + For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). |
| 74 | + |
| 75 | ++ allow_connection : typing.Optional[bool] |
| 76 | ++ Allows external connections to this chat via the /connect endpoint. |
| 77 | ++ |
| 78 | + config_id : typing.Optional[str] |
| 79 | + The unique identifier for an EVI configuration. |
| 80 | + |
| 81 | +@@ -224,6 +241,8 @@ class AsyncRawChatClient: |
| 82 | + query_params = httpx.QueryParams() |
| 83 | + if access_token is not None: |
| 84 | + query_params = query_params.add("access_token", access_token) |
| 85 | ++ if allow_connection is not None: |
| 86 | ++ query_params = query_params.add("allow_connection", allow_connection) |
| 87 | + if config_id is not None: |
| 88 | + query_params = query_params.add("config_id", config_id) |
| 89 | + if config_version is not None: |
| 90 | +@@ -236,10 +255,18 @@ class AsyncRawChatClient: |
| 91 | + query_params = query_params.add("verbose_transcription", verbose_transcription) |
| 92 | + if api_key is not None: |
| 93 | + query_params = query_params.add("api_key", api_key) |
| 94 | +- if session_settings is not None: |
| 95 | +- flattened_params = single_query_encoder("session_settings", session_settings) |
| 96 | +- for param_key, param_value in flattened_params: |
| 97 | +- query_params = query_params.add(param_key, str(param_value)) |
| 98 | ++ if ( |
| 99 | ++ convert_and_respect_annotation_metadata( |
| 100 | ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" |
| 101 | ++ ) |
| 102 | ++ is not None |
| 103 | ++ ): |
| 104 | ++ query_params = query_params.add( |
| 105 | ++ "session_settings", |
| 106 | ++ convert_and_respect_annotation_metadata( |
| 107 | ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" |
| 108 | ++ ), |
| 109 | ++ ) |
| 110 | + ws_url = ws_url + f"?{query_params}" |
| 111 | + headers = self._client_wrapper.get_headers() |
| 112 | + if request_options and "additional_headers" in request_options: |
0 commit comments