Skip to content

Commit 8623168

Browse files
bibryammsfussell
andauthored
Enhanced the OpenAI conversation component docs to include Azure seciton (#4887)
* Enhanced the OpenAI conversation component documentation to include Azure OpenAI configuration guidance. Signed-off-by: Bilgin Ibryam <bibryam@gmail.com> * Update daprdocs/content/en/reference/components-reference/supported-conversation/openai.md Signed-off-by: Mark Fussell <markfussell@gmail.com> --------- Signed-off-by: Bilgin Ibryam <bibryam@gmail.com> Signed-off-by: Mark Fussell <markfussell@gmail.com> Co-authored-by: Mark Fussell <markfussell@gmail.com>
1 parent 5c54c4c commit 8623168

File tree

1 file changed

+42
-0
lines changed
  • daprdocs/content/en/reference/components-reference/supported-conversation

1 file changed

+42
-0
lines changed

daprdocs/content/en/reference/components-reference/supported-conversation/openai.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,48 @@ The above example uses secrets as plain strings. It is recommended to use a secr
4646
| `apiType` | N | Specifies the API provider type. Required when using a provider that does not follow the default OpenAI API endpoint conventions. | `azure` |
4747
| `apiVersion`| N | The API version to use. Required when the `apiType` is set to `azure`. | `2025-04-01-preview` |
4848

49+
## Azure OpenAI Configuration
50+
51+
To configure the OpenAI component to connect to Azure OpenAI, you need to set the following metadata fields which are required for Azure's API format.
52+
53+
### Required fields for Azure OpenAI
54+
55+
When connecting to Azure OpenAI, the following fields are **required**:
56+
57+
- `apiType`: Must be set to `azure` to enable Azure OpenAI compatibility
58+
- `endpoint`: Your Azure OpenAI resource endpoint URL (e.g., `https://your-resource.openai.azure.com/`)
59+
- `apiVersion`: The API version for your Azure OpenAI deployment (e.g., `2025-01-01-preview`)
60+
- `key`: Your Azure OpenAI API key
61+
62+
Get your configuration values from: https://ai.azure.com/
63+
64+
### Azure OpenAI component example
65+
66+
```yaml
67+
apiVersion: dapr.io/v1alpha1
68+
kind: Component
69+
metadata:
70+
name: azure-openai
71+
spec:
72+
type: conversation.openai
73+
metadata:
74+
- name: key
75+
value: "your-azure-openai-api-key"
76+
- name: model
77+
value: "gpt-4.1-nano" # Default: gpt-4.1-nano
78+
- name: endpoint
79+
value: "https://your-resource.openai.azure.com/"
80+
- name: apiType
81+
value: "azure"
82+
- name: apiVersion
83+
value: "2025-01-01-preview"
84+
```
85+
86+
87+
{{% alert title="Note" color="primary" %}}
88+
When using Azure OpenAI, both `endpoint` and `apiVersion` are mandatory fields. The component returns an error if either field is missing when `apiType` is set to `azure`.
89+
{{% /alert %}}
90+
4991
## Related links
5092

5193
- [Conversation API overview]({{% ref conversation-overview.md %}})

0 commit comments

Comments
 (0)