This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Conversation component specs
The supported conversation components that interface with Dapr
Table headers to note:
Header | Description | Example |
---|
Status | Component certification status | Alpha Beta Stable
|
Component version | The version of the component | v1 |
Since runtime version | The version of the Dapr runtime when the component status was set or updated | 1.11 |
Amazon Web Services (AWS)
Component | Status | Component version | Since runtime version |
---|
AWS Bedrock | Alpha | v1 | 1.15 |
Generic
Component | Status | Component version | Since runtime version |
---|
Anthropic | Alpha | v1 | 1.15 |
DeepSeek | Alpha | v1 | 1.15 |
GoogleAI | Alpha | v1 | 1.16 |
Huggingface | Alpha | v1 | 1.15 |
Local echo | Stable | v1 | 1.15 |
Mistral | Alpha | v1 | 1.15 |
Ollama | Alpha | v1 | 1.16 |
OpenAI | Alpha | v1 | 1.15 |
1 - Anthropic
Detailed information on the Anthropic conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: anthropic
spec:
type: conversation.anthropic
metadata:
- name: key
value: "mykey"
- name: model
value: claude-3-5-sonnet-20240620
- name: cacheTTL
value: 10m
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
key | Y | API key for Anthropic. | "mykey" |
model | N | The Anthropic LLM to use. Defaults to claude-3-5-sonnet-20240620 | claude-3-5-sonnet-20240620 |
cacheTTL | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
- Conversation API overview
2 - AWS Bedrock
Detailed information on the AWS Bedrock conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: awsbedrock
spec:
type: conversation.aws.bedrock
metadata:
- name: endpoint
value: "http://localhost:4566"
- name: model
value: amazon.titan-text-express-v1
- name: cacheTTL
value: 10m
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
endpoint | N | AWS endpoint for the component to use and connect to emulators. Not recommended for production AWS use. | http://localhost:4566 |
model | N | The LLM to use. Defaults to Bedrock’s default provider model from Amazon. | amazon.titan-text-express-v1 |
cacheTTL | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
Authenticating AWS
Instead of using a key
parameter, AWS Bedrock authenticates using Dapr’s standard method of IAM or static credentials. Learn more about authenticating with AWS.
- Conversation API overview
3 - DeepSeek
Detailed information on the DeepSeek conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: deepseek
spec:
type: conversation.deepseek
metadata:
- name: key
value: mykey
- name: maxTokens
value: 2048
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
key | Y | API key for DeepSeek. | mykey |
maxTokens | N | The max amount of tokens for each request. | 2048 |
- Conversation API overview
4 - Local Testing
Detailed information on the echo conversation component used for local testing
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: echo
spec:
type: conversation.echo
version: v1
Information
This component is only meant for local validation and testing of a Conversation component implementation. It does not actually send the data to any LLM but rather echos the input back directly.- Conversation API overview
5 - GoogleAI
Detailed information on the GoogleAI conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: googleai
spec:
type: conversation.googleai
metadata:
- name: key
value: mykey
- name: model
value: gemini-1.5-flash
- name: cacheTTL
value: 10m
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
key | Y | API key for GoogleAI. | mykey |
model | N | The GoogleAI LLM to use. Defaults to gemini-1.5-flash . | gemini-2.0-flash |
cacheTTL | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
- Conversation API overview
6 - Huggingface
Detailed information on the Huggingface conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: huggingface
spec:
type: conversation.huggingface
metadata:
- name: key
value: mykey
- name: model
value: meta-llama/Meta-Llama-3-8B
- name: cacheTTL
value: 10m
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
key | Y | API key for Huggingface. | mykey |
model | N | The Huggingface LLM to use. Defaults to meta-llama/Meta-Llama-3-8B . | meta-llama/Meta-Llama-3-8B |
cacheTTL | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
- Conversation API overview
7 - Mistral
Detailed information on the Mistral conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: mistral
spec:
type: conversation.mistral
metadata:
- name: key
value: mykey
- name: model
value: open-mistral-7b
- name: cacheTTL
value: 10m
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
key | Y | API key for Mistral. | mykey |
model | N | The Mistral LLM to use. Defaults to open-mistral-7b . | open-mistral-7b |
cacheTTL | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
- Conversation API overview
8 - Ollama
Detailed information on the Ollama conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: ollama
spec:
type: conversation.ollama
metadata:
- name: model
value: llama3.2:latest
- name: cacheTTL
value: 10m
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
model | N | The Ollama LLM to use. Defaults to llama3.2:latest . | phi4:latest |
cacheTTL | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
OpenAI Compatibility
Ollama is compatible with OpenAI’s API. You can use the OpenAI component with Ollama models with the following changes:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: ollama-openai
spec:
type: conversation.openai # use the openai component type
metadata:
- name: key
value: 'ollama' # just any non-empty string
- name: model
value: gpt-oss:20b # an ollama model (https://ollama.com/search) in this case openai open source model. See https://ollama.com/library/gpt-oss
- name: endpoint
value: 'http://localhost:11434/v1' # ollama endpoint
- Conversation API overview
9 - OpenAI
Detailed information on the OpenAI conversation component
A Dapr conversation.yaml
component file has the following structure:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: openai
spec:
type: conversation.openai
metadata:
- name: key
value: mykey
- name: model
value: gpt-4-turbo
- name: endpoint
value: 'https://api.openai.com/v1'
- name: cacheTTL
value: 10m
# - name: apiType # Optional
# value: 'azure'
# - name: apiVersion # Optional
# value: '2025-01-01-preview'
Warning
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described
here.
Field | Required | Details | Example |
---|
key | Y | API key for OpenAI. | mykey |
model | N | The OpenAI LLM to use. Defaults to gpt-4-turbo . | gpt-4-turbo |
endpoint | N | Custom API endpoint URL for OpenAI API-compatible services. If not specified, the default OpenAI API endpoint is used. Required when apiType is set to azure . | https://api.openai.com/v1 , https://example.openai.azure.com/ |
cacheTTL | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
apiType | N | Specifies the API provider type. Required when using a provider that does not follow the default OpenAI API endpoint conventions. | azure |
apiVersion | N | The API version to use. Required when the apiType is set to azure . | 2025-04-01-preview |
Azure OpenAI Configuration
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.
Required fields for Azure OpenAI
When connecting to Azure OpenAI, the following fields are required:
apiType
: Must be set to azure
to enable Azure OpenAI compatibilityendpoint
: Your Azure OpenAI resource endpoint URL (e.g., https://your-resource.openai.azure.com/
)apiVersion
: The API version for your Azure OpenAI deployment (e.g., 2025-01-01-preview
)key
: Your Azure OpenAI API key
Get your configuration values from: https://ai.azure.com/
Azure OpenAI component example
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: azure-openai
spec:
type: conversation.openai
metadata:
- name: key
value: "your-azure-openai-api-key"
- name: model
value: "gpt-4.1-nano" # Default: gpt-4.1-nano
- name: endpoint
value: "https://your-resource.openai.azure.com/"
- name: apiType
value: "azure"
- name: apiVersion
value: "2025-01-01-preview"
Note
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
.