Skip to content

Commit f9062a9

Browse files
committed
docs: address code review
Signed-off-by: tylerslaton <[email protected]>
1 parent e225194 commit f9062a9

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Overview
44

5-
GPTScript is a new scripting language to automate your interaction with a Large Language Model (LLM), namely OpenAI. The ultimate goal is to create a fully natural language based programming experience. The syntax of GPTScript is largely natural language, making it very easy to learn and use.
5+
GPTScript is a new scripting language to automate your interaction with a Large Language Model (LLM), namely OpenAI. The ultimate goal is to create a natural language programming experience. The syntax of GPTScript is largely natural language, making it very easy to learn and use.
66
Natural language prompts can be mixed with traditional scripts such as bash and python or even external HTTP service
7-
calls. With GPTScript you can do just about anything like [plan a vacation](./examples/travel-agent.gpt),
7+
calls. With GPTScript you can do just about anything, like [plan a vacation](./examples/travel-agent.gpt),
88
[edit a file](./examples/add-go-mod-dep.gpt), [run some SQL](./examples/sqlite-download.gpt), or [build a mongodb/flask app](./examples/hacker-news-headlines.gpt).
99

1010
```yaml
@@ -175,7 +175,7 @@ Description: Tool description
175175
# This tool can invoke tool1 or tool2 if needed
176176
Tools: tool1, tool2
177177
Args: arg1: The description of arg1
178-
178+
179179
Tool instructions go here.
180180
```
181181
#### Tool Parameters
@@ -228,7 +228,7 @@ description: A tool that echos the input
228228
args: input: The input
229229

230230
#!/bin/bash
231-
231+
232232
echo "${input}"
233233
```
234234

@@ -247,7 +247,7 @@ Join us on Discord: [![Discord](https://img.shields.io/discord/12045584209848648
247247

248248
## License
249249

250-
Copyright (c) 2023 [Acorn Labs, Inc.](http://acorn.io)
250+
Copyright (c) 2024 [Acorn Labs, Inc.](http://acorn.io)
251251

252252
Licensed under the Apache License, Version 2.0 (the "License");
253253
you may not use this file except in compliance with the License.

docs/docs/01-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: Overview
33
slug: /
44
---
55

6-
GPTScript is a new scripting language to automate your interaction with a Large Language Model (LLM), namely OpenAI. The ultimate goal is to create a fully natural language based programming experience. The syntax of GPTScript is largely natural language, making it very easy to learn and use. Natural language prompts can be mixed with traditional scripts such as bash and python or even external HTTP service calls. With GPTScript you can do just about anything like [plan a vacation](https://github.com/gptscript-ai/gptscript/blob/main/examples/travel-agent.gpt), [edit a file](https://github.com/gptscript-ai/gptscript/blob/main/examples/add-go-mod-dep.gpt), [run some SQL](https://github.com/gptscript-ai/gptscript/blob/main/examples/sqlite-download.gpt), or [build a mongodb/flask app](https://github.com/gptscript-ai/gptscript/blob/main/examples/hacker-news-headlines.gpt).
6+
GPTScript is a new scripting language to automate your interaction with a Large Language Model (LLM), namely OpenAI. The ultimate goal is to create a natural language programming experience. The syntax of GPTScript is largely natural language, making it very easy to learn and use. Natural language prompts can be mixed with traditional scripts such as bash and python or even external HTTP service calls. With GPTScript you can do just about anything, like [plan a vacation](https://github.com/gptscript-ai/gptscript/blob/main/examples/travel-agent.gpt), [edit a file](https://github.com/gptscript-ai/gptscript/blob/main/examples/add-go-mod-dep.gpt), [run some SQL](https://github.com/gptscript-ai/gptscript/blob/main/examples/sqlite-download.gpt), or [build a mongodb/flask app](https://github.com/gptscript-ai/gptscript/blob/main/examples/hacker-news-headlines.gpt).
77

88
:::note
9-
We are currently exploring options for interacting with GPTScript using local models.
9+
We are currently exploring options for interacting with local models using GPTScript.
1010
:::
1111

1212
```yaml

docs/docs/100-tools/01-using.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ All GPTScripts have access to system tools, like `sys.read` and `sys.write`, tha
1212
```yaml
1313
tools: sys.read, sys.write
1414

15-
Read all of the files in my current directory, do no recurse over any subdirectories, and give me a description of this directory's contents.s
15+
Read all of the files in my current directory, do not recurse over any subdirectories, and give me a description of this directory's contents.
1616
```
1717

1818
System tools are a set of core tools that come packaged with GPTScript by default.
@@ -38,12 +38,16 @@ Select a number at random between 1 and 100 and return only the number.
3838

3939
This is where the real power of GPTScript starts to become evident. For this example lets use the external [image-generation](https://github.com/gptscript-ai/image-generation) and [search](https://github.com/gptscript-ai/search) tools to generate an image and then search the web for similar images.
4040

41+
:::note
42+
There will be better packaging and distribution for external tools in the future. For now, this assumes you have the tools cloned locally and are pointing to their repos directly.
43+
:::
44+
4145
```yaml
42-
tools: ./image-generation/tool.gpt, ./search, sys.read
46+
tools: ./image-generation/tool.gpt, ./vision/tool.gpt, sys.read
4347

4448
Generate an image of a city skyline at night and write the resulting image to a file called city_skyline.png.
4549

46-
Take this image and search the web for similar images. Write links for the top 5 results to a file called similar_images.txt.
50+
Take this image and write a description of it in the style of pirate.
4751
```
4852

4953
External tools are tools that are defined by a `tool.gpt` file in their root directory. They can be imported into a GPTScript by specifying the path to the tool's root directory.

docs/docs/100-tools/02-authoring.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Authoring Tools
22

3-
You can author your own tools for your use or to share with others. The process for authoring a tool is as simple as creating a `tool.gpt` file in the root directory of your tool This file is itself a GPTScript that defines the tool's name, description, and what it should do.
3+
You can author your own tools for your use or to share with others. The process for authoring a tool is as simple as creating a `tool.gpt` file in the root directory of your project. This file is itself a GPTScript that defines the tool's name, description, and what it should do.
44

55
Here's an example of the `tool.gpt` file for the `image-generation` tool:
66

@@ -17,6 +17,10 @@ args: number: (optional) The number of images to generate. Defaults to 1.
1717

1818
At the bottom you'll notice a shebang line that specifies the command to run when the tool is invoked. This is the exact command that will be executed when the tool is used in a GPTScript. Doing this with tools allows for a high degree of reliability that the tool would not otherwise have.
1919

20+
:::tip
21+
Every arg becomes an environment variable when the tool is invoked.
22+
:::
23+
2024
## Binary Tools
2125
GPTScript can call binaries and scripts located on your system or externally. This is done by defining a `tool.gpt` file in the same directory that the binary or script is located. In that `tool.gpt` file, you call it directly using the `#!` directive.
2226

0 commit comments

Comments
 (0)