Skip to content

Commit 6bd7256

Browse files
authored
Fix a few typos (#910)
1 parent 1a2aca2 commit 6bd7256

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

temporalio/contrib/openai_agents/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To provide durable execution, Temporal needs to be able to recover from failures
3333
To do this, Temporal requires separating an application's deterministic (repeatable) and non-deterministic parts:
3434

3535
1. Deterministic pieces, termed *workflows*, execute the same way if re-run with the same inputs.
36-
2. Non-deterministic pieces, termed *activies*, have no limitations—they may perform I/O and any other operations.
36+
2. Non-deterministic pieces, termed *activities*, have no limitations—they may perform I/O and any other operations.
3737

3838
Temporal maintains a server-side execution history of all state state passing in and out of a workflow, using it to recover when needed.
3939
See the [Temporal documentation](https://docs.temporal.io/evaluate/understanding-temporal#temporal-application-the-building-blocks) for more information.
@@ -78,14 +78,14 @@ class HelloWorldAgent:
7878
If you are familiar with Temporal and with Open AI Agents SDK, this code will look very familiar.
7979
We annotate the `HelloWorldAgent` class with `@workflow.defn` to define a workflow, then use the `@workflow.run` annotation to define the entrypoint.
8080
We use the `Agent` class to define a simple agent, one which always responds with haikus.
81-
Within the workflow, we start agent using the `Runner`, as is typical, passing through `prompt` as an argument.
81+
Within the workflow, we start the agent using the `Runner`, as is typical, passing through `prompt` as an argument.
8282

8383
Perhaps the most interesting thing about this code is the `workflow.unsafe.imports_passed_through()` context manager that precedes the OpenAI Agents SDK imports.
8484
This statement tells Temporal to skip sandboxing for these trusted libraries.
8585
This is important because Python's dynamic nature forces Temporal's Python's sandbox to re-validate imports every time a workflow runs, which comes at a performance cost.
8686
The OpenAI Agents SDK also contains certain code that Temporal is not able to validate automatically for determinism.
8787

88-
The second file, `run_worker.py`, lauches a Temporal worker.
88+
The second file, `run_worker.py`, launches a Temporal worker.
8989
This is a program that connects to the Temporal server and receives work to run, in this case `HelloWorldAgent` invocations.
9090

9191
```python
@@ -131,7 +131,7 @@ if __name__ == "__main__":
131131
We wrap the entire `worker_main` function body in the `set_open_ai_agent_temporal_overrides()` context manager.
132132
This causes a Temporal activity to be invoked whenever the OpenAI Agents SDK invokes an LLM or calls a tool.
133133
We also pass the `open_ai_data_converter` to the Temporal Client, which ensures proper serialization of OpenAI Agents SDK data.
134-
We create a `ModelActivity` which serves as a generic wrapper for LLM calls, and we register this wrapper's invocation point, `model_activity.invoke_model_activity`, with the workflow.
134+
We create a `ModelActivity` which serves as a generic wrapper for LLM calls, and we register this wrapper's invocation point, `model_activity.invoke_model_activity`, with the worker.
135135

136136
In order to launch the agent, use the standard Temporal workflow invocation:
137137

@@ -169,7 +169,7 @@ if __name__ == "__main__":
169169

170170
This launcher script executes the Temporal workflow to start the agent.
171171

172-
Note that this basic example works without providing the `open_ai_data_converter` to the Temporal client that executes the workflow, but we include it because morem complex uses will generally need it.
172+
Note that this basic example works without providing the `open_ai_data_converter` to the Temporal client that executes the workflow, but we include it because more complex uses will generally need it.
173173

174174

175175
## Using Temporal Activities as OpenAI Agents Tools

0 commit comments

Comments
 (0)