From 8b64166bb7c07872114226c36afaa090b9f3d882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Fri, 27 Mar 2026 20:33:25 -0700 Subject: [PATCH] Fix Sarvam examples to use 'user' role instead of 'developer' Sarvam uses the OpenAI-compatible API but does not support the 'developer' role, causing errors. Use 'user' role instead. --- examples/foundational/07z-interruptible-sarvam-http.py | 2 +- examples/foundational/07z-interruptible-sarvam.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/foundational/07z-interruptible-sarvam-http.py b/examples/foundational/07z-interruptible-sarvam-http.py index bca27e051..09938cf96 100644 --- a/examples/foundational/07z-interruptible-sarvam-http.py +++ b/examples/foundational/07z-interruptible-sarvam-http.py @@ -111,7 +111,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info(f"Client connected") # Kick off the conversation. context.add_message( - {"role": "developer", "content": "Please introduce yourself to the user."} + {"role": "user", "content": "Please introduce yourself to the user."} ) await task.queue_frames([LLMRunFrame()]) diff --git a/examples/foundational/07z-interruptible-sarvam.py b/examples/foundational/07z-interruptible-sarvam.py index bd007d89e..031b82116 100644 --- a/examples/foundational/07z-interruptible-sarvam.py +++ b/examples/foundational/07z-interruptible-sarvam.py @@ -104,9 +104,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): async def on_client_connected(transport, client): logger.info(f"Client connected") # Kick off the conversation. - context.add_message( - {"role": "developer", "content": "Please introduce yourself to the user."} - ) + context.add_message({"role": "user", "content": "Please introduce yourself to the user."}) await task.queue_frames([LLMRunFrame()]) # Optionally, you can wait for 30 seconds and then change the voice.