mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-10-12 02:12:50 +00:00
docs: sync Haystack API reference on Docusaurus (#13147)
Co-authored-by: sjrl <[email protected]>
This commit is contained in:
@@ -58,7 +58,8 @@ Initialize the QueryExpander component.
|
||||
**Parameters:**
|
||||
|
||||
- **chat_generator** (<code>ChatGenerator | None</code>) – The chat generator component to use for query expansion.
|
||||
If None, a default OpenAIChatGenerator with gpt-4.1-mini model is used.
|
||||
If None, a default `OpenAIResponsesChatGenerator` with the gpt-4.1-mini model and `store` set to `False`
|
||||
is used.
|
||||
- **prompt_template** (<code>str | None</code>) – Custom [PromptBuilder](https://docs.haystack.deepset.ai/docs/promptbuilder)
|
||||
template for query expansion. The template should instruct the LLM to return a JSON response with the
|
||||
structure: `{"queries": ["query1", "query2", "query3"]}`. The template should include 'query' and
|
||||
|
||||
@@ -82,8 +82,8 @@ Initialize the LLMRanker component.
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- **chat_generator** (<code>ChatGenerator | None</code>) – The chat generator to use for reranking. If `None`, a default `OpenAIChatGenerator` configured for JSON
|
||||
output is used.
|
||||
- **chat_generator** (<code>ChatGenerator | None</code>) – The chat generator to use for reranking. If `None`, a default `OpenAIResponsesChatGenerator` configured for
|
||||
JSON output and with `store` set to `False` is used.
|
||||
- **prompt** (<code>str</code>) – Custom prompt template for reranking. The prompt must include exactly the variables `query` and
|
||||
`documents` and instruct the LLM to return ranked 1-based document indices as JSON.
|
||||
- **top_k** (<code>int</code>) – The maximum number of ranked documents to return. Not applied when the ranker falls back to the input
|
||||
|
||||
Reference in New Issue
Block a user