Skip to content

Commit adf7d68

Browse files
SDK regeneration
1 parent 0ef36d8 commit adf7d68

467 files changed

Lines changed: 976 additions & 13326 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
},
1212
"use_typeddict_requests": true,
1313
"should_generate_websocket_clients": true,
14-
"enable_wire_tests": true
14+
"enable_wire_tests": true,
15+
"pydantic_config": {
16+
"skip_validation": true
17+
}
1518
},
16-
"sdkVersion": "6.0.0-beta.4"
19+
"sdkVersion": "5.3.2"
1720
}

README.md

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Power your apps with world-class speech and Language AI models
1717
- [Async Client](#async-client)
1818
- [Exception Handling](#exception-handling)
1919
- [Advanced Features](#advanced-features)
20-
- [Websockets](#websockets)
2120
- [Advanced](#advanced)
2221
- [Access Raw Response Data](#access-raw-response-data)
2322
- [Retries](#retries)
@@ -206,62 +205,6 @@ response = client.listen.v1.media.transcribe_file(
206205
)
207206
```
208207

209-
## Websockets
210-
211-
The SDK supports both sync and async websocket connections for real-time, low-latency communication. Sockets can be created using the `connect` method, which returns a context manager.
212-
You can either iterate through the returned `SocketClient` to process messages as they arrive, or attach handlers to respond to specific events.
213-
214-
```python
215-
216-
# Connect to the websocket (Sync)
217-
import threading
218-
219-
from deepgram import DeepgramClient
220-
221-
client = DeepgramClient(...)
222-
223-
with client.v1.connect() as socket:
224-
# Iterate over the messages as they arrive
225-
for message in socket
226-
print(message)
227-
228-
# Or, attach handlers to specific events
229-
socket.on(EventType.OPEN, lambda _: print("open"))
230-
socket.on(EventType.MESSAGE, lambda message: print("received message", message))
231-
socket.on(EventType.CLOSE, lambda _: print("close"))
232-
socket.on(EventType.ERROR, lambda error: print("error", error))
233-
234-
235-
# Start the listening loop in a background thread
236-
listener_thread = threading.Thread(target=socket.start_listening, daemon=True)
237-
listener_thread.start()
238-
```
239-
240-
```python
241-
242-
# Connect to the websocket (Async)
243-
import asyncio
244-
245-
from deepgram import AsyncDeepgramClient
246-
247-
client = AsyncDeepgramClient(...)
248-
249-
async with client.v1.connect() as socket:
250-
# Iterate over the messages as they arrive
251-
async for message in socket
252-
print(message)
253-
254-
# Or, attach handlers to specific events
255-
socket.on(EventType.OPEN, lambda _: print("open"))
256-
socket.on(EventType.MESSAGE, lambda message: print("received message", message))
257-
socket.on(EventType.CLOSE, lambda _: print("close"))
258-
socket.on(EventType.ERROR, lambda error: print("error", error))
259-
260-
261-
# Start listening for events in an asyncio task
262-
listen_task = asyncio.create_task(socket.start_listening())
263-
```
264-
265208
## Advanced
266209

267210
### Access Raw Response Data

poetry.lock

Lines changed: 1 addition & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dynamic = ["version"]
44

55
[tool.poetry]
66
name = "deepgram-sdk"
7-
version = "6.0.0-beta.4"
7+
version = "5.3.2"
88
description = ""
99
readme = "README.md"
1010
authors = []
@@ -41,7 +41,6 @@ httpx = ">=0.21.2"
4141
pydantic = ">= 1.9.2"
4242
pydantic-core = ">=2.18.2"
4343
typing_extensions = ">= 4.0.0"
44-
websockets = ">=12.0"
4544

4645
[tool.poetry.group.dev.dependencies]
4746
mypy = "==1.13.0"

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ httpx>=0.21.2
22
pydantic>= 1.9.2
33
pydantic-core>=2.18.2
44
typing_extensions>= 4.0.0
5-
websockets>=12.0

0 commit comments

Comments
 (0)