Skip to content

Commit c1e4e04

Browse files
docs: sync Haystack API reference on Docusaurus (#11561)
Co-authored-by: julian-risch <4181769+julian-risch@users.noreply.github.com>
1 parent c1e5f2e commit c1e4e04

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ for the full list.
246246

247247
```python
248248
__init__(
249-
azure_endpoint: str | None = None,
250-
api_version: str | None = "2024-12-01-preview",
249+
azure_endpoint: str | Secret | None = None,
250+
api_version: str | Secret | None = "2024-12-01-preview",
251251
azure_deployment: str | None = "gpt-4.1-mini",
252252
api_key: Secret | None = Secret.from_env_var(
253253
"AZURE_OPENAI_API_KEY", strict=False
@@ -275,8 +275,15 @@ Initialize the Azure OpenAI Chat Generator component.
275275

276276
**Parameters:**
277277

278-
- **azure_endpoint** (<code>str | None</code>) – The endpoint of the deployed model, for example `"https://example-resource.azure.openai.com/"`.
279-
- **api_version** (<code>str | None</code>) – The version of the API to use. Defaults to 2024-12-01-preview.
278+
- **azure_endpoint** (<code>str | Secret | None</code>) – The endpoint of the deployed model, for example `"https://example-resource.azure.openai.com/"`.
279+
Can also be a [Secret](https://docs.haystack.deepset.ai/docs/secret-management), for example
280+
`Secret.from_env_var("AZURE_OPENAI_ENDPOINT")`, to resolve the value from an environment variable at
281+
runtime. This is useful to switch endpoints between environments (e.g. dev and prod) without changing the
282+
serialized pipeline.
283+
- **api_version** (<code>str | Secret | None</code>) – The version of the API to use. Defaults to 2024-12-01-preview.
284+
Can also be a [Secret](https://docs.haystack.deepset.ai/docs/secret-management), for example
285+
`Secret.from_env_var("AZURE_OPENAI_API_VERSION")`, to resolve the value from an environment variable at
286+
runtime.
280287
- **azure_deployment** (<code>str | None</code>) – The deployment of the model, usually the model name.
281288
- **api_key** (<code>Secret | None</code>) – The API key to use for authentication.
282289
- **azure_ad_token** (<code>Secret | None</code>) – [Azure Active Directory token](https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id).

0 commit comments

Comments
 (0)