Use "developer" role for programmatic conversation-kickoff messages

These messages are developer instructions to the assistant (e.g. "Please
introduce yourself to the user"), not simulated user input. The
"developer" role is semantically correct for this purpose.
This commit is contained in:
Paul Kompfner
2026-03-20 17:21:46 -04:00
parent 2bb36b5b66
commit d779a5b4ea
189 changed files with 472 additions and 191 deletions

View File

@@ -248,7 +248,9 @@ Your response will be turned into speech so use only simple words and punctuatio
async def on_client_connected(transport, client):
logger.info(f"Client connected")
# Start conversation - empty prompt to let LLM follow system instructions
context.add_message({"role": "user", "content": "Please introduce yourself to the user."})
context.add_message(
{"role": "developer", "content": "Please introduce yourself to the user."}
)
await task.queue_frames([LLMRunFrame()])
@transport.event_handler("on_client_disconnected")