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

Spec metadata fields

FieldRequiredDetailsExample
keyYAPI key for OpenAI.mykey
modelNThe OpenAI LLM to use. Defaults to gpt-4-turbo.gpt-4-turbo
cacheTTLNA time-to-live value for a prompt cache to expire. Uses Golang duration format.10m