Skip to content

Commit 3f9761f

Browse files
committed
docs: make workflow guide example synchronous
Signed-off-by: Nick Hale <[email protected]>
1 parent e634183 commit 3f9761f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/docs/02-examples/05-workflow.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Run an Automated Workflow
22

3-
Automating a sequence of tasks that integrate with one or more systems is a ubiquitous engineering problem that typically requires some degree of domain-specific knowledge up-front.
4-
However, workflows written with GPTScript all but eliminate this prerequisite, enabling developers to build their workflows by describing just the steps it should perform.
3+
Automating a sequence of tasks that integrate with one or more systems is a ubiquitous engineering problem that typically requires some degree of domain-specific knowledge up-front. However, workflows written with GPTScript all but eliminate this prerequisite, enabling developers to build their workflows by describing the high-level steps it should perform.
54

65
This guide will show you how to build a GPTScript that encapsulates a workflow consisting of the following steps:
76
1. Get a selection of twitter posts
@@ -39,8 +38,10 @@ Add the following tool definition to the file:
3938

4039
```
4140
Tools: sys.write, summarize-tweet
42-
Description: Summarize tweets
41+
Description: Summarize tweets
4342
43+
Always summarize tweets synchronously in the order they appear.
44+
Never summarize tweets in parallel.
4445
Write all the summaries for the tweets at the following URLs to `tweets.md`:
4546
- https://x.com/acornlabs/status/1798063732394000559
4647
- https://x.com/acornlabs/status/1797998244447900084
@@ -52,6 +53,7 @@ This tool:
5253
- imports two other tools
5354
- `sys.write` is a built-in tool which enables the entrypoint tool to write files to your system.
5455
- `summarize-tweet` is a custom tool that encapsulates how each tweet gets summarized. We'll define this tool in the next step.
56+
- ensures tweets are never summarized in parallel to ensure they are summarized in the correct order
5557
- defines the tweet URLs to summarize and the file to write them to
5658

5759
At a high-level, it's getting the summaries for two tweets and storing them in the `tweets.md` file.
@@ -118,9 +120,11 @@ uses the `github.com/gptscript-ai/browser` tool to get content at a URL and retu
118120
Let's take a look at this script as one cohesive file:
119121

120122
```
121-
Description: Summarize tweets
123+
Description: Summarize tweets
122124
Tools: sys.write, summarize-tweet
123125
126+
Always summarize tweets synchronously in the order they appear.
127+
Never summarize tweets in parallel.
124128
Write all the summaries for the tweets at the following URLs to `tweets.md`:
125129
- https://x.com/acornlabs/status/1798063732394000559
126130
- https://x.com/acornlabs/status/1797998244447900084

0 commit comments

Comments
 (0)