Skip to content

Commit 4db967d

Browse files
Sync Haystack API reference on Docusaurus (#10052)
Co-authored-by: Amnah199 <[email protected]>
1 parent 564780b commit 4db967d

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

docs-website/reference/haystack-api/generators_api.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,16 +1108,19 @@ See OpenAI [documentation](https://platform.openai.com/docs/api-reference/respon
11081108
comprising the top 10% probability mass are considered.
11091109
- `previous_response_id`: The ID of the previous response.
11101110
Use this to create multi-turn conversations.
1111-
- `text_format`: A JSON schema or a Pydantic model that enforces the structure of the model's response.
1111+
- `text_format`: A Pydantic model that enforces the structure of the model's response.
11121112
If provided, the output will always be validated against this
11131113
format (unless the model returns a tool call).
11141114
For details, see the [OpenAI Structured Outputs documentation](https://platform.openai.com/docs/guides/structured-outputs).
1115+
- `text`: A JSON schema that enforces the structure of the model's response.
1116+
If provided, the output will always be validated against this
1117+
format (unless the model returns a tool call).
11151118
Notes:
1116-
- This parameter accepts Pydantic models and JSON schemas for latest models starting from GPT-4o.
1117-
Older models only support basic version of structured outputs through `{"type": "json_object"}`.
1118-
For detailed information on JSON mode, see the [OpenAI Structured Outputs documentation](https://platform.openai.com/docs/guides/structured-outputs#json-mode).
1119-
- For structured outputs with streaming,
1120-
the `text_format` must be a JSON schema and not a Pydantic model.
1119+
- Both JSON Schema and Pydantic models are supported for latest models starting from GPT-4o.
1120+
- If both are provided, `text_format` takes precedence and json schema passed to `text` is ignored.
1121+
- Currently, this component doesn't support streaming for structured outputs.
1122+
- Older models only support basic version of structured outputs through `{"type": "json_object"}`.
1123+
For detailed information on JSON mode, see the [OpenAI Structured Outputs documentation](https://platform.openai.com/docs/guides/structured-outputs#json-mode).
11211124
- `reasoning`: A dictionary of parameters for reasoning. For example:
11221125
- `summary`: The summary of the reasoning.
11231126
- `effort`: The level of effort to put into the reasoning. Can be `low`, `medium` or `high`.
@@ -2104,16 +2107,19 @@ See OpenAI [documentation](https://platform.openai.com/docs/api-reference/respon
21042107
comprising the top 10% probability mass are considered.
21052108
- `previous_response_id`: The ID of the previous response.
21062109
Use this to create multi-turn conversations.
2107-
- `text_format`: A JSON schema or a Pydantic model that enforces the structure of the model's response.
2110+
- `text_format`: A Pydantic model that enforces the structure of the model's response.
21082111
If provided, the output will always be validated against this
21092112
format (unless the model returns a tool call).
21102113
For details, see the [OpenAI Structured Outputs documentation](https://platform.openai.com/docs/guides/structured-outputs).
2114+
- `text`: A JSON schema that enforces the structure of the model's response.
2115+
If provided, the output will always be validated against this
2116+
format (unless the model returns a tool call).
21112117
Notes:
2112-
- This parameter accepts Pydantic models and JSON schemas for latest models starting from GPT-4o.
2113-
Older models only support basic version of structured outputs through `{"type": "json_object"}`.
2114-
For detailed information on JSON mode, see the [OpenAI Structured Outputs documentation](https://platform.openai.com/docs/guides/structured-outputs#json-mode).
2115-
- For structured outputs with streaming,
2116-
the `text_format` must be a JSON schema and not a Pydantic model.
2118+
- Both JSON Schema and Pydantic models are supported for latest models starting from GPT-4o.
2119+
- If both are provided, `text_format` takes precedence and json schema passed to `text` is ignored.
2120+
- Currently, this component doesn't support streaming for structured outputs.
2121+
- Older models only support basic version of structured outputs through `{"type": "json_object"}`.
2122+
For detailed information on JSON mode, see the [OpenAI Structured Outputs documentation](https://platform.openai.com/docs/guides/structured-outputs#json-mode).
21172123
- `reasoning`: A dictionary of parameters for reasoning. For example:
21182124
- `summary`: The summary of the reasoning.
21192125
- `effort`: The level of effort to put into the reasoning. Can be `low`, `medium` or `high`.

0 commit comments

Comments
 (0)