guidance.user

guidance.user() AbstractContextManager

Indicate the ‘user’ prompt

A convention has grown up around ‘chat’ APIs that prompts are split into three parts: system, user and assistant. This indicates the start of a ‘user’ block, which provides input to the LLM from the user.

>>> with user():
>>>     lm += "What the user said"