OpenAI
Detailed information on the OpenAI conversation component
Component format
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: 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.Spec metadata fields
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 |
cacheTTL |
N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | 10m |
Related links
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified December 10, 2024: [Conversation API] initial docs setup (#4419) (78f6cb94)