Skip to content

Commit 101068f

Browse files
authored
Merge branch 'v1.15' into endgame_1.15-updates
2 parents 4903f01 + 89f4d52 commit 101068f

File tree

12 files changed

+483
-5
lines changed

12 files changed

+483
-5
lines changed

daprdocs/content/en/developing-applications/building-blocks/conversation/howto-conversation-layer.md

+22
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,28 @@ spec:
3434
version: v1
3535
```
3636
37+
### Use the OpenAI component
38+
39+
To interface with a real LLM, use one of the other [supported conversation components]({{< ref "supported-conversation" >}}), including OpenAI, Hugging Face, Anthropic, DeepSeek, and more.
40+
41+
For example, to swap out the `echo` mock component with an `OpenAI` component, replace the `conversation.yaml` file with the following. You'll need to copy your API key into the component file.
42+
43+
```
44+
apiVersion: dapr.io/v1alpha1
45+
kind: Component
46+
metadata:
47+
name: openai
48+
spec:
49+
type: conversation.openai
50+
metadata:
51+
- name: key
52+
value: <REPLACE_WITH_YOUR_KEY>
53+
- name: model
54+
value: gpt-4-turbo
55+
- name: cacheTTL
56+
value: 10m
57+
```
58+
3759
## Connect the conversation client
3860
3961
The following examples use an HTTP client to send a POST request to Dapr's sidecar HTTP endpoint. You can also use [the Dapr SDK client instead]({{< ref "#related-links" >}}).

0 commit comments

Comments
 (0)