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
# Use the plugin to configure Temporal for use with OpenAI Agents SDK
169
157
plugins=[OpenAIAgentsPlugin()],
170
158
)
@@ -197,24 +185,19 @@ if __name__ == "__main__":
197
185
198
186
This recipe uses Temporal's environment configuration system to connect to Temporal. By default, it connects to a local Temporal server. To use Temporal Cloud:
199
187
200
-
1.Copy the example configuration file from the ai-cookbook root:
188
+
1.Set the `TEMPORAL_PROFILE` environment variable to use the cloud profile:
201
189
```bash
202
-
cp ../../config.toml.example ../../config.toml
190
+
export TEMPORAL_PROFILE=cloud
203
191
```
204
192
205
-
2. Edit `config.toml` in the ai-cookbook root and update the `[profile.cloud]` section with your Temporal Cloud credentials:
206
-
- Set `address` to your Temporal Cloud namespace address
207
-
- Set `namespace` to your namespace name
208
-
- For authentication, choose one of:
209
-
- Set `api_key` to your Temporal Cloud API key, or
210
-
- Set `client_cert_path` and `client_key_path` in the `[profile.cloud.tls]` section to use TLS certificates
211
-
212
-
3. Set the `TEMPORAL_PROFILE` environment variable to use the cloud profile:
193
+
2. Configure the cloud profile using the Temporal CLI:
213
194
```bash
214
-
export TEMPORAL_PROFILE=cloud
195
+
temporal config set --profile cloud --prop address --value "CLOUD_REMOTE_ADDRESS"
196
+
temporal config set --profile cloud --prop namespace --value "CLOUD_NAMESPACE"
197
+
temporal config set --profile cloud --prop api_key --value "CLOUD_API_KEY"
215
198
```
216
199
217
-
The code will automatically use `config.toml` if it exists, otherwise it falls back to `config.toml.example`.
200
+
For TLS certificate authentication instead of API key, refer to the [Temporal environment configuration documentation](https://docs.temporal.io/develop/environment-configuration) for details.
This recipe uses Temporal's environment configuration system to connect to Temporal. By default, it connects to a local Temporal server. To use Temporal Cloud:
341
325
342
-
1.Copy the example configuration file from the ai-cookbook root:
326
+
1.Set the `TEMPORAL_PROFILE` environment variable to use the cloud profile:
343
327
```bash
344
-
cp ../../config.toml.example ../../config.toml
328
+
export TEMPORAL_PROFILE=cloud
345
329
```
346
330
347
-
2. Edit `config.toml` in the ai-cookbook root and update the `[profile.cloud]` section with your Temporal Cloud credentials:
348
-
- Set `address` to your Temporal Cloud namespace address
349
-
- Set `namespace` to your namespace name
350
-
- For authentication, choose one of:
351
-
- Set `api_key` to your Temporal Cloud API key, or
352
-
- Set `client_cert_path` and `client_key_path` in the `[profile.cloud.tls]` section to use TLS certificates
353
-
354
-
3. Set the `TEMPORAL_PROFILE` environment variable to use the cloud profile:
331
+
2. Configure the cloud profile using the Temporal CLI:
355
332
```bash
356
-
export TEMPORAL_PROFILE=cloud
333
+
temporal config set --profile cloud --prop address --value "CLOUD_REMOTE_ADDRESS"
334
+
temporal config set --profile cloud --prop namespace --value "CLOUD_NAMESPACE"
335
+
temporal config set --profile cloud --prop api_key --value "CLOUD_API_KEY"
357
336
```
358
337
359
-
The code will automatically use `config.toml` if it exists, otherwise it falls back to `config.toml.example`.
338
+
For TLS certificate authentication instead of API key, refer to the [Temporal environment configuration documentation](https://docs.temporal.io/develop/environment-configuration) for details.
0 commit comments