docs: sync Haystack API reference on Docusaurus (#11153)

Co-authored-by: julian-risch <[email protected]>
This commit is contained in:
Haystack Bot
2026-04-20 14:27:06 +02:00
committed by GitHub
co-authored by julian-risch
parent 0dd8806c46
commit c3f682cab5
@@ -1221,8 +1221,8 @@ __init__(
*,
chat_generator: ChatGenerator,
system_prompt: str | None = None,
user_prompt: str | None = None,
required_variables: list[str] | Literal["*"] | None = None,
user_prompt: str,
required_variables: list[str] | Literal["*"] = "*",
streaming_callback: StreamingCallbackT | None = None
) -> None
```
@@ -1233,12 +1233,18 @@ Initialize the LLM component.
- **chat_generator** (<code>ChatGenerator</code>) – An instance of the chat generator that the LLM should use.
- **system_prompt** (<code>str | None</code>) – System prompt for the LLM.
- **user_prompt** (<code>str | None</code>) – User prompt for the LLM. If provided this is appended to the messages provided at runtime.
- **required_variables** (<code>list\[str\] | Literal['\*'] | None</code>) – List variables that must be provided as input to user_prompt.
- **user_prompt** (<code>str</code>) – User prompt for the LLM. Must contain at least one Jinja2 template variable
(e.g., `{{ variable_name }}`). This prompt is appended to the messages provided at runtime.
- **required_variables** (<code>list\[str\] | Literal['\*']</code>) – Variables that must be provided as input to user_prompt.
If a variable listed as required is not provided, an exception is raised.
If set to `"*"`, all variables found in the prompt are required. Optional.
If set to `"*"`, all variables found in the prompt are required. Defaults to `"*"`.
- **streaming_callback** (<code>StreamingCallbackT | None</code>) – A callback that will be invoked when a response is streamed from the LLM.
**Raises:**
- <code>ValueError</code> – If user_prompt contains no template variables.
- <code>ValueError</code> – If required_variables is an empty list.
#### to_dict
```python