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
Help the user acomplish their tasks using the tools you have. When the user starts this chat, just say hello and ask what you can help with. You donlt need to start off by guiding them.
160
+
Help the user acomplish their tasks using the tools you have. When the user starts this chat, just say hello and ask what you can help with. You don't need to start off by guiding them.
161
161
```
162
162
163
163
By being at the top of the file, this tool will serve as the script's entrypoint. Here are the parts of this tool that are worth additional explanation:
@@ -201,14 +201,14 @@ Context: shared-context
201
201
Agents: k8s-agent, github-agent
202
202
Chat: true
203
203
204
-
Help the user acomplish their tasks using the tools you have. When the user starts this chat, just say hello and ask what you can help with. You donlt need to start off by guiding them.
204
+
Help the user acomplish their tasks using the tools you have. When the user starts this chat, just say hello and ask what you can help with. You don't need to start off by guiding them.
205
205
206
206
---
207
207
Name: k8s-agent
208
208
Description: An agent that can help you with your Kubernetes cluster by executing kubectl commands
209
209
Context: shared-context
210
210
Tools: sys.exec
211
-
Parameter: task: The kubectl releated task to accomplish
211
+
Parameter: task: The kubectl related task to accomplish
212
212
Chat: true
213
213
214
214
You have the kubectl cli available to you. Use it to accomplish the tasks that the user asks of you.
@@ -268,15 +268,15 @@ By now you should notice a simple pattern emerging that you can follow to add yo
268
268
```
269
269
Name: {your cli}-agent
270
270
Description: An agent to help you with {your taks} related tasks using the gh cli
271
-
Context: {here's your biggest decsion to make}, shared-context
271
+
Context: {here's your biggest decision to make}, shared-context
272
272
Tools: sys.exec
273
-
Parameter: task: The {your task}The GitHub task to accomplish
273
+
Parameter: task: The {your task} to accomplish
274
274
Chat: true
275
275
276
276
You have the {your cli} cli available to you. Use it to accomplish the tasks that the user asks of you.
277
277
```
278
278
279
-
You can drop in your task and CLI and have a fairly functional CLI-based chat agent. The biggest decision you'll need to make is what and how much context to give your agent. For well-known for CLIs/technologies like kubectl and Kubernetes, you probably won't need a custom context. For custom CLIs, you'll definitely need to help the LLM out. The best approach is to experiment and see what works best.
279
+
You can drop in your task and CLI and have a fairly functional CLI-based chat agent. The biggest decision you'll need to make is what and how much context to give your agent. For well-known CLIs/technologies like kubectl and Kubernetes, you probably won't need a custom context. For custom CLIs, you'll definitely need to help the LLM out. The best approach is to experiment and see what works best.
Copy file name to clipboardExpand all lines: docs/docs/02-examples/04-local-files.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -45,11 +45,11 @@ This is actually the entirety of the script. We're packing a lot of power into j
45
45
46
46
The **Tools: ...** stanza pulls two useful tools into this assistant.
47
47
48
-
The [structured-data-querier](https://github.com/gptscript-ai/structured-data-querier) makes it possible to query csv, xlsx, and json files as though they SQL databases (using an application called [DuckDB](https://duckdb.org/)). This is extremely powerful when combined with the power of LLMs because it let's you ask natural language questions that the LLM can then translate to SQL.
48
+
The [structured-data-querier](https://github.com/gptscript-ai/structured-data-querier) makes it possible to query csv, xlsx, and json files as though they were SQL databases (using an application called [DuckDB](https://duckdb.org/)). This is extremely powerful when combined with the power of LLMs because it let's you ask natural language questions that the LLM can then translate to SQL.
49
49
50
50
The [pdf-reader](https://github.com/gptscript-ai/pdf-reader) isn't quite as exciting, but still useful. It parses and reads PDFs and returns the contents to the LLM. This will put the entire contents in your chat context, so it's not appropriate for extremely large PDFs, but it's handy for smaller ones.
51
51
52
-
**Context: github.com/gptscript-ai/context/workspace** introduces a context tool makes this assistant "workspace" aware. It's description reads:
52
+
**Context: github.com/gptscript-ai/context/workspace** introduces a context tool that makes this assistant "workspace" aware. It's description reads:
53
53
> Adds the workspace and tools needed to access the workspace to the current context
54
54
55
55
That translates to telling the LLM what the workspace directory is and instructing it to use that directory for reading and writing files. As we saw above, you can specify a workspace like this:
Copy file name to clipboardExpand all lines: docs/docs/03-tools/05-context.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Here is a simple example of a context provider tool that provides additional con
45
45
46
46
```yaml
47
47
# my-search-context-tool.gpt
48
-
export: sys.http.html2text?
48
+
share tools: sys.http.html2text?
49
49
50
50
#!/bin/bash
51
51
echo You are an expert web researcher with access to the Search tool.If the search tool fails to return any information stop execution of the script with message "Sorry! Search did not return any results". Feel free to get the contents of the returned URLs in order to get more information. Provide as much detail as you can. Also return the source of the search results.
@@ -71,7 +71,7 @@ Here is an example of a context provider tool that uses args to decide which sea
Copy file name to clipboardExpand all lines: docs/docs/03-tools/06-how-it-works.md
+1-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
# How it works
2
2
3
-
**_GPTScript is composed of tools._** Each tool performs a series of actions similar to a function. Tools have available
4
-
to them other tools that can be invoked similar to a function call. While similar to a function, the tools are
3
+
**_GPTScript is composed of tools._** Each tool performs a series of actions similar to a function. Tools have other tools available to them that can be invoked similar to a function call. While similar to a function, the tools are
5
4
primarily implemented with a natural language prompt. **_The interaction of the tools is determined by the AI model_**,
6
5
the model determines if the tool needs to be invoked and what arguments to pass. Tools are intended to be implemented
7
6
with a natural language prompt but can also be implemented with a command or HTTP call.
0 commit comments