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
> The examples will not work if you do not have a OpenAI API key exported in the environment.
52
70
71
+
Create a `.env` file in the project root and add your OpenAI API key:
72
+
> **Warning**
73
+
> The examples will not work if you do not have a OpenAI API key exported in the environment.
74
+
53
75
Create a `.env` file in the project root and add your OpenAI API key:
54
76
55
77
```env
@@ -63,6 +85,11 @@ Export the environment variables from the .env file to your shell:
63
85
export$(grep -v '^#' .env | xargs)# or if .env is in the root directory, you can just run `export $(grep -v '^#' ../../.env | xargs)`
64
86
```
65
87
88
+
Export the environment variables from the .env file to your shell:
89
+
```bash
90
+
export$(grep -v '^#' .env | xargs)# or if .env is in the root directory, you can just run `export $(grep -v '^#' ../../.env | xargs)`
91
+
```
92
+
66
93
## Examples
67
94
68
95
### 1. Basic LLM Usage
@@ -167,6 +194,9 @@ A stateful agent that uses Dapr Workflows to ensure durability and persistence o
167
194
We are using the Dapr ChatClient to interact with the OpenAI API. In the components folder, we have a `openai.yaml` file that contains the configuration for the OpenAI API.
168
195
You need to replace the `{YOUR_OPENAI_API_KEY}` with your actual OpenAI API key.
169
196
197
+
We are using the Dapr ChatClient to interact with the OpenAI API. In the components folder, we have a `openai.yaml` file that contains the configuration for the OpenAI API.
198
+
You need to replace the `{YOUR_OPENAI_API_KEY}` with your actual OpenAI API key.
We are using the `resolve_env_templates.py` script to resolve the environment variables in the components folder and substitute them with the actual values in your .env file, like the OpenAI API key.
219
+
220
+
<!-- STEP
221
+
name: Run basic LLM example
222
+
expected_stdout_lines:
223
+
- "I want to find flights to Paris"
224
+
- "TravelBuddy"
225
+
timeout_seconds: 30
226
+
output_match_mode: substring
227
+
-->
228
+
229
+
188
230
We are using the `resolve_env_templates.py` script to resolve the environment variables in the components folder and substitute them with the actual values in your .env file, like the OpenAI API key.
0 commit comments