Skip to content

Commit

Permalink
Minor doc fixes (run-llama#16938)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverxchen authored Nov 13, 2024
1 parent 37c2ed1 commit 51df72f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/docs/understanding/workflows/basic_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ print(result)
This will simply print "Hello, World!" to the console.

In this code we:

* Define a class `MyWorkflow` that inherits from `Workflow`
* Use the @step decorator to define a single step `my_step`
* The step takes a single argument, `ev`, which is an instance of `StartEvent`
Expand Down Expand Up @@ -130,6 +131,7 @@ class SecondEvent(Event):
## Defining the workflow

Now we define the workflow itself. We do this by defining the input and output types on each step.

* `step_one` takes a `StartEvent` and returns a `FirstEvent`
* `step_two` takes a `FirstEvent` and returns a `SecondEvent`
* `step_three` takes a `SecondEvent` and returns a `StopEvent`
Expand Down
1 change: 1 addition & 0 deletions docs/docs/understanding/workflows/concurrent_execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class ConcurrentFlow(Workflow):
```

There are several changes we've made to handle multiple event types:

* `start` is now declared as emitting 3 different event types
* `step_three` is now declared as accepting 3 different event types
* `collect_events` now takes an array of the event types to wait for
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/understanding/workflows/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Let's build [a basic workflow](basic_flow.md). Follow the tutorial sequence step

Once you're done, check out our [Workflows component guide](../../module_guides/workflow/index.md) as a reference guide + more practical examples on building RAG/agents.

If you're done building and want to deploy your workflow to production, check out [our llama_deploy guide](../../module_guides/workflow/deployment.md) ([repo](https://github.com/run-llama/llama_deploy)).
If you're done building and want to deploy your workflow to production, check out [our llama_deploy guide](../../module_guides/llama_deploy/) ([repo](https://github.com/run-llama/llama_deploy)).
2 changes: 1 addition & 1 deletion docs/docs/understanding/workflows/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ if __name__ == "__main__":
asyncio.run(main())
```

`create_task` runs the workflow in the background, while `stream_events` will provide any event that gets written to the stream. It stops when the stream delivers a `StopEvent`, after which you can get the final result of the workflow as you normally would.
`run` runs the workflow in the background, while `stream_events` will provide any event that gets written to the stream. It stops when the stream delivers a `StopEvent`, after which you can get the final result of the workflow as you normally would.


Next let's look at [concurrent execution](concurrent_execution.md).

0 comments on commit 51df72f

Please sign in to comment.