spacr.qt.ai.prompts

System prompts used by the AI console.

Two shapes:

Functions

default_system_prompt(→ str)

Return the spaCR-aware assistant persona used for freeform chat.

error_explainer_prompt(→ str)

Return the system prompt that turns a traceback into a numbered fix list.

wrap_error_for_prompt(→ str)

Turn a raw traceback into the user message body sent to the model.

Module Contents

spacr.qt.ai.prompts.default_system_prompt() → str[source]

Return the spaCR-aware assistant persona used for freeform chat.

spacr.qt.ai.prompts.error_explainer_prompt() → str[source]

Return the system prompt that turns a traceback into a numbered fix list.

spacr.qt.ai.prompts.wrap_error_for_prompt(traceback_text: str, active_app: str = '') → str[source]

Turn a raw traceback into the user message body sent to the model.

Parameters:

traceback_text – the raw traceback text; surrounding whitespace is stripped and the rest is placed inside a fenced code block.