Skip to content

Commit 384d32d

Browse files
authored
Merge pull request pipecat-ai#2952 from pipecat-ai/mb/add-daily-room-properties-to-runner
Add support for dailyRoomProperties when calling /start using the dev…
2 parents a7d52d8 + 196d6e3 commit 384d32d

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
163163

164164
### Changed
165165

166+
- The development runner's `/start` endpoint now supports passing
167+
`dailyRoomProperties` in the request body when `createDailyRoom` is true.
168+
Properties are validated against the `DailyRoomProperties` type and passed to
169+
Daily's room creation API.
170+
166171
- `UserImageRawFrame` new fields `append_to_context` and `text`. The
167172
`append_to_context` field indicates if this image and text should be added to
168173
the LLM context (by the LLM assistant aggregator). The `text` field, if set,

src/pipecat/runner/run.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ async def start_agent(request: Request):
570570

571571
create_daily_room = request_data.get("createDailyRoom", False)
572572
body = request_data.get("body", {})
573+
daily_room_properties_dict = request_data.get("dailyRoomProperties", None)
573574

574575
bot_module = _get_bot_module()
575576

@@ -584,9 +585,20 @@ async def start_agent(request: Request):
584585
import aiohttp
585586

586587
from pipecat.runner.daily import configure
588+
from pipecat.transports.daily.utils import DailyRoomProperties
587589

588590
async with aiohttp.ClientSession() as session:
589-
room_url, token = await configure(session)
591+
# Parse dailyRoomProperties if provided
592+
room_properties = None
593+
if daily_room_properties_dict:
594+
try:
595+
room_properties = DailyRoomProperties(**daily_room_properties_dict)
596+
logger.debug(f"Using custom room properties: {room_properties}")
597+
except Exception as e:
598+
logger.error(f"Failed to parse dailyRoomProperties: {e}")
599+
# Continue without custom properties
600+
601+
room_url, token = await configure(session, room_properties=room_properties)
590602
runner_args = DailyRunnerArguments(room_url=room_url, token=token, body=body)
591603
result = {
592604
"dailyRoom": room_url,

0 commit comments

Comments
 (0)