File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ FROM ghcr.io/astral-sh/uv:python${PYTHON_VERSION}-bookworm-slim AS base
1010# the application crashes without emitting any logs due to buffering.
1111ENV PYTHONUNBUFFERED=1
1212
13+ # Compile Python source to bytecode (.pyc) during install so the first import
14+ # doesn't pay the compilation cost. This reduces agent cold-start time at the
15+ # expense of a slightly longer build.
16+ ENV UV_COMPILE_BYTECODE=1
17+
1318# --- Build stage ---
1419# Install dependencies, build native extensions, and prepare the application
1520FROM base AS build
Original file line number Diff line number Diff line change @@ -127,14 +127,6 @@ async def my_agent(ctx: JobContext):
127127 # llm=openai.realtime.RealtimeModel(voice="marin")
128128 # )
129129
130- # # Add a virtual avatar to the session, if desired
131- # # For other providers, see https://docs.livekit.io/agents/models/avatar/
132- # avatar = hedra.AvatarSession(
133- # avatar_id="...", # See https://docs.livekit.io/agents/models/avatar/plugins/hedra
134- # )
135- # # Start the avatar and wait for it to join
136- # await avatar.start(session, room=ctx.room)
137-
138130 # Start the session, which initializes the voice pipeline and warms up the models
139131 await session .start (
140132 agent = Assistant (),
@@ -148,6 +140,17 @@ async def my_agent(ctx: JobContext):
148140 ),
149141 )
150142
143+ # # Add a virtual avatar to the session, if desired
144+ # # For other providers, see https://docs.livekit.io/agents/models/avatar/
145+ # avatar = anam.AvatarSession(
146+ # persona_config=anam.PersonaConfig(
147+ # name="...",
148+ # avatarId="...", # See https://docs.livekit.io/agents/models/avatar/plugins/anam
149+ # ),
150+ # )
151+ # # Start the avatar and wait for it to join
152+ # await avatar.start(session, room=ctx.room)
153+
151154 # Join the room and connect to the user
152155 await ctx .connect ()
153156
You can’t perform that action at this time.
0 commit comments