You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: daprdocs/content/en/reference/components-reference/supported-conversation/openai.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,48 @@ The above example uses secrets as plain strings. It is recommended to use a secr
46
46
|`apiType`| N | Specifies the API provider type. Required when using a provider that does not follow the default OpenAI API endpoint conventions. |`azure`|
47
47
|`apiVersion`| N | The API version to use. Required when the `apiType` is set to `azure`. |`2025-04-01-preview`|
48
48
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
+
49
91
## Related links
50
92
51
93
- [Conversation API overview]({{% ref conversation-overview.md %}})
0 commit comments