yr.sys_prompt

sys_prompt(
    prompt: str,
) → None

Append a line to the active LLM context's system prompt.

Parameters

prompt
type: str

Text to add to the system prompt for subsequent chat and struct calls in the current LLM context.

Examples

Set the assistant's behaviour before generating a response:

python
import yera as yr

yr.sys_prompt("Answer each question in one short sentence.")
yr.response("Why is the sky blue?")