File tree Expand file tree Collapse file tree 3 files changed +21
-15
lines changed
quickstarts/05-multi-agent-workflows Expand file tree Collapse file tree 3 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ OPENAI_API_KEY=your_api_key_here
6969
70702 . Configure the OpenAI component. You have two options:
7171
72- a. Directly update the ` key ` in [ components/openai.yaml] ( components/openai.yaml ) :
72+ a. Directly update the ` key ` in [ components/openai.yaml] ( components/openai.yaml ) , and remove the secretKeyRef :
7373 ``` yaml
7474 metadata :
7575 - name : key
@@ -78,21 +78,10 @@ OPENAI_API_KEY=your_api_key_here
7878
7979 b. Use environment variables (recommended):
8080 ` ` ` bash
81- # Get the environment variables from the .env file:
81+ # Get the environment variables from the .env file exported to be use
8282 export $(grep -v '^#' ../../.env | xargs)
83-
84- # Create a temporary resources folder with resolved environment variables
85- temp_resources_folder=$(../resolve_env_templates.py ./components)
86-
87- # Use the temporary folder when running your dapr commands
88- dapr run -f dapr-random.yaml --resources-path $temp_resources_folder
89-
90- # Clean up the temporary folder when done
91- rm -rf $temp_resources_folder
9283 ```
9384
94- Note: The temporary resources folder will be automatically deleted when the Dapr sidecar is stopped or when the computer is restarted.
95-
96853 . Make sure Dapr is initialized on your system:
9786
9887``` bash
Original file line number Diff line number Diff line change 1+ apiVersion : dapr.io/v1alpha1
2+ kind : Component
3+ metadata :
4+ name : envvar-secret-store
5+ spec :
6+ type : secretstores.local.env
7+ version : v1
8+ metadata :
9+ # to limit what environment variables are loaded into the secret store to only those prefixed with "MYAPP_"
10+ # - name: prefix
11+ # value: "MYAPP_"
Original file line number Diff line number Diff line change 77 version : v1
88 metadata :
99 - name : key
10- value : " {{OPENAI_API_KEY}}"
10+ # we could also use the key directly here but is not recommended
11+ # value: "{{OPENAI_API_KEY}}"
12+ secretKeyRef : # using environment variable secret store
13+ name : OPENAI_API_KEY
14+ key : OPENAI_API_KEY
1115 - name : model
12- value : gpt-4o-mini
16+ value : gpt-5-2025-08-07
1317 - name : temperature
1418 value : 1
19+ auth :
20+ secretStore : envvar-secret-store
You can’t perform that action at this time.
0 commit comments