Skip to content

Commit 8219d04

Browse files
wip
1 parent 12687bc commit 8219d04

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,18 @@ async def generate():
299299
rt_encode_output=True,
300300
rt_voice="marin",
301301
output_format="audio",
302-
audio_output_format="m4a",
302+
audio_output_format="mp3",
303303
audio_input_format="mp4",
304304
):
305305
yield chunk
306306

307307
return StreamingResponse(
308308
content=generate(),
309-
media_type="audio/mp4",
309+
media_type="audio/mp3",
310310
headers={
311311
"Cache-Control": "no-store",
312312
"Pragma": "no-cache",
313-
"Content-Disposition": "inline; filename=stream.m4a",
313+
"Content-Disposition": "inline; filename=stream.mp3",
314314
"X-Accel-Buffering": "no",
315315
},
316316
)

docs/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,18 @@ This example will work using expo-audio on Android and iOS.
224224
rt_encode_output=True,
225225
rt_voice="marin",
226226
output_format="audio",
227-
audio_output_format="m4a",
228-
audio_input_format="mp4",
227+
audio_output_format="mp3",
228+
audio_input_format="m4a",
229229
):
230230
yield chunk
231231
232232
return StreamingResponse(
233233
content=generate(),
234-
media_type="audio/mp4",
234+
media_type="audio/mp3",
235235
headers={
236236
"Cache-Control": "no-store",
237237
"Pragma": "no-cache",
238-
"Content-Disposition": "inline; filename=stream.m4a",
238+
"Content-Disposition": "inline; filename=stream.mp3",
239239
"X-Accel-Buffering": "no",
240240
},
241241
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "solana-agent"
3-
version = "31.2.4-dev1"
3+
version = "31.2.4-dev2"
44
description = "AI Agents for Solana"
55
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
66
license = "MIT"

solana_agent/adapters/openai_realtime_ws.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,15 @@ def _strip_tool_strict(tools_val):
10371037
if "tools" in patch:
10381038
patch["tools"] = _strip_tool_strict(patch["tools"]) # idempotent
10391039

1040+
# Per server requirements, always include session.type and output_modalities
1041+
try:
1042+
patch["type"] = "realtime"
1043+
# Preserve caller-provided output_modalities if present, otherwise default to audio
1044+
if "output_modalities" not in patch:
1045+
patch["output_modalities"] = ["audio"]
1046+
except Exception:
1047+
pass
1048+
10401049
payload = {"type": "session.update", "session": patch}
10411050
# Mark awaiting updated and store last patch
10421051
self._last_session_patch = patch or {}

0 commit comments

Comments
 (0)