Skip to main content

property Chat.system_prompt : str

The system prompt sent to the model. Defaults to Atoti’s built-in prompt. Reading queries the server; assigning updates the configuration immediately (requires the ROLE_ADMIN role) and takes effect on the next chat run. Assigning replaces the prompt entirely: concatenate to the current value to keep the built-in prompt, or assign a new string to override it. It defaults to the built-in prompt:
>>> print(chat.system_prompt)  
You are a UI assistant.
...
Append extra instructions to it:
>>> chat.system_prompt = chat.system_prompt + "\nAlways answer in French."
>>> print(chat.system_prompt)  
You are a UI assistant.
...
Always answer in French.
Or replace it entirely:
>>> chat.system_prompt = "I know what I am doing, let me drive."
>>> chat.system_prompt
'I know what I am doing, let me drive.'