RenderContext - Tinker Documentation

tinker_cookbook.renderers.RenderContext

class tinker_cookbook.renderers.RenderContext()

Context passed to render_message for rendering a single message.

This allows renderers to access information about the message's position in the conversation without changing the render_message signature for each new piece of context needed.

Fields:

This is computed by the base build_generation_prompt/build_supervised_example and used by renderers like Qwen3.5 that need to treat assistant messages differently based on whether they come before or after the last user message.

Referenced by