|
| 1 | +diff --git a/var/folders/5_/tlgrkrq92pv1mxbrp9y7v3h80000gn/T/fern-generate-zKcOwT/hume-python-sdk/src/hume/empathic_voice/chat/socket_client.py b/Users/twitchard/dev/fern-config/fern/apis/unioned/.preview/fern-python-sdk/src/hume/empathic_voice/chat/socket_client.py |
| 2 | +index de3b4a5e..18ee74ab 100644 |
| 3 | +--- a/var/folders/5_/tlgrkrq92pv1mxbrp9y7v3h80000gn/T/fern-generate-zKcOwT/hume-python-sdk/src/hume/empathic_voice/chat/socket_client.py |
| 4 | ++++ b/Users/twitchard/dev/fern-config/fern/apis/unioned/.preview/fern-python-sdk/src/hume/empathic_voice/chat/socket_client.py |
| 5 | +@@ -6,21 +6,10 @@ from json.decoder import JSONDecodeError |
| 6 | + |
| 7 | + import websockets |
| 8 | + import websockets.sync.connection as websockets_sync_connection |
| 9 | +-from typing_extensions import deprecated |
| 10 | +-from contextlib import asynccontextmanager |
| 11 | +- |
| 12 | + from ...core.events import EventEmitterMixin, EventType |
| 13 | + from ...core.pydantic_utilities import parse_obj_as |
| 14 | +-from ..types.assistant_input import AssistantInput |
| 15 | +-from ..types.audio_input import AudioInput |
| 16 | +-from ..types.pause_assistant_message import PauseAssistantMessage |
| 17 | +-from ..types.resume_assistant_message import ResumeAssistantMessage |
| 18 | +-from ..types.session_settings import SessionSettings |
| 19 | +-from ..types.tool_error_message import ToolErrorMessage |
| 20 | +-from ..types.tool_response_message import ToolResponseMessage |
| 21 | +-from ..types.user_input import UserInput |
| 22 | +-from .types.publish_event import PublishEvent |
| 23 | + from ..types.subscribe_event import SubscribeEvent |
| 24 | ++from .types.publish_event import PublishEvent |
| 25 | + |
| 26 | + try: |
| 27 | + from websockets.legacy.client import WebSocketClientProtocol # type: ignore |
| 28 | +@@ -29,58 +18,6 @@ except ImportError: |
| 29 | + |
| 30 | + ChatSocketClientResponse = typing.Union[SubscribeEvent] |
| 31 | + |
| 32 | +-class ChatConnectSessionSettingsAudio(typing.TypedDict, total=False): |
| 33 | +- channels: typing.Optional[int] |
| 34 | +- encoding: typing.Optional[str] |
| 35 | +- sample_rate: typing.Optional[int] |
| 36 | +- |
| 37 | +- |
| 38 | +-class ChatConnectSessionSettingsContext(typing.TypedDict, total=False): |
| 39 | +- text: typing.Optional[str] |
| 40 | +- |
| 41 | +- |
| 42 | +-SessionSettingsVariablesValue = typing.Union[str, float, bool] |
| 43 | +- |
| 44 | +-class ChatConnectSessionSettings(typing.TypedDict, total=False): |
| 45 | +- audio: typing.Optional[ChatConnectSessionSettingsAudio] |
| 46 | +- context: typing.Optional[ChatConnectSessionSettingsContext] |
| 47 | +- custom_session_id: typing.Optional[str] |
| 48 | +- event_limit: typing.Optional[int] |
| 49 | +- language_model_api_key: typing.Optional[str] |
| 50 | +- system_prompt: typing.Optional[str] |
| 51 | +- variables: typing.Optional[typing.Dict[str, SessionSettingsVariablesValue]] |
| 52 | +- voice_id: typing.Optional[str] |
| 53 | +- |
| 54 | +-@deprecated("Use .connect() with kwargs instead.") |
| 55 | +-class ChatConnectOptions(typing.TypedDict, total=False): |
| 56 | +- config_id: typing.Optional[str] |
| 57 | +- """ |
| 58 | +- The ID of the configuration. |
| 59 | +- """ |
| 60 | +- |
| 61 | +- config_version: typing.Optional[str] |
| 62 | +- """ |
| 63 | +- The version of the configuration. |
| 64 | +- """ |
| 65 | +- |
| 66 | +- api_key: typing.Optional[str] |
| 67 | +- |
| 68 | +- secret_key: typing.Optional[str] |
| 69 | +- |
| 70 | +- resumed_chat_group_id: typing.Optional[str] |
| 71 | +- |
| 72 | +- verbose_transcription: typing.Optional[bool] |
| 73 | +- |
| 74 | +- """ |
| 75 | +- ID of the Voice to use for this chat. If specified, will override the voice set in the Config |
| 76 | +- """ |
| 77 | +- voice_id: typing.Optional[str] |
| 78 | +- |
| 79 | +- session_settings: typing.Optional[typing.Dict] |
| 80 | +- """ |
| 81 | +- Session settings to apply at connection time. Supports all SessionSettings fields except |
| 82 | +- builtin_tools, type, metadata, and tools. Additionally supports event_limit. |
| 83 | +- """ |
| 84 | + |
| 85 | + class AsyncChatSocketClient(EventEmitterMixin): |
| 86 | + def __init__(self, *, websocket: WebSocketClientProtocol): |
| 87 | +@@ -141,38 +78,6 @@ class AsyncChatSocketClient(EventEmitterMixin): |
| 88 | + """ |
| 89 | + await self._send(data.dict()) |
| 90 | + |
| 91 | +- @deprecated("Use send_publish instead.") |
| 92 | +- async def send_audio_input(self, message: AudioInput) -> None: |
| 93 | +- await self.send_publish(message) |
| 94 | +- |
| 95 | +- @deprecated("Use send_publish instead.") |
| 96 | +- async def send_session_settings(self, message: SessionSettings) -> None: |
| 97 | +- await self.send_publish(message) |
| 98 | +- |
| 99 | +- @deprecated("Use send_publish instead.") |
| 100 | +- async def send_user_input(self, message: UserInput) -> None: |
| 101 | +- await self.send_publish(message) |
| 102 | +- |
| 103 | +- @deprecated("Use send_publish instead.") |
| 104 | +- async def send_assistant_input(self, message: AssistantInput) -> None: |
| 105 | +- await self.send_publish(message) |
| 106 | +- |
| 107 | +- @deprecated("Use send_publish instead.") |
| 108 | +- async def send_tool_response(self, message: ToolResponseMessage) -> None: |
| 109 | +- await self.send_publish(message) |
| 110 | +- |
| 111 | +- @deprecated("Use send_publish instead.") |
| 112 | +- async def send_tool_error(self, message: ToolErrorMessage) -> None: |
| 113 | +- await self.send_publish(message) |
| 114 | +- |
| 115 | +- @deprecated("Use send_publish instead.") |
| 116 | +- async def send_pause_assistant(self, message: PauseAssistantMessage) -> None: |
| 117 | +- await self.send_publish(message) |
| 118 | +- |
| 119 | +- @deprecated("Use send_publish instead.") |
| 120 | +- async def send_resume_assistant(self, message: ResumeAssistantMessage) -> None: |
| 121 | +- await self.send_publish(message) |
| 122 | +- |
| 123 | + |
| 124 | + class ChatSocketClient(EventEmitterMixin): |
| 125 | + def __init__(self, *, websocket: websockets_sync_connection.Connection): |
| 126 | +@@ -232,35 +137,3 @@ class ChatSocketClient(EventEmitterMixin): |
| 127 | + Send a Pydantic model to the websocket connection. |
| 128 | + """ |
| 129 | + self._send(data.dict()) |
| 130 | +- |
| 131 | +- @deprecated("Use send_publish instead.") |
| 132 | +- def send_audio_input(self, message: AudioInput) -> None: |
| 133 | +- self.send_publish(message) |
| 134 | +- |
| 135 | +- @deprecated("Use send_publish instead.") |
| 136 | +- def send_session_settings(self, message: SessionSettings) -> None: |
| 137 | +- self.send_publish(message) |
| 138 | +- |
| 139 | +- @deprecated("Use send_publish instead.") |
| 140 | +- def send_user_input(self, message: UserInput) -> None: |
| 141 | +- self.send_publish(message) |
| 142 | +- |
| 143 | +- @deprecated("Use send_publish instead.") |
| 144 | +- def send_assistant_input(self, message: AssistantInput) -> None: |
| 145 | +- self.send_publish(message) |
| 146 | +- |
| 147 | +- @deprecated("Use send_publish instead.") |
| 148 | +- def send_tool_response(self, message: ToolResponseMessage) -> None: |
| 149 | +- self.send_publish(message) |
| 150 | +- |
| 151 | +- @deprecated("Use send_publish instead.") |
| 152 | +- def send_tool_error(self, message: ToolErrorMessage) -> None: |
| 153 | +- self.send_publish(message) |
| 154 | +- |
| 155 | +- @deprecated("Use send_publish instead.") |
| 156 | +- def send_pause_assistant(self, message: PauseAssistantMessage) -> None: |
| 157 | +- self.send_publish(message) |
| 158 | +- |
| 159 | +- @deprecated("Use send_publish instead.") |
| 160 | +- def send_resume_assistant(self, message: ResumeAssistantMessage) -> None: |
| 161 | +- self.send_publish(message) |
0 commit comments