-
Notifications
You must be signed in to change notification settings - Fork 293
Chore: Add documentation for context #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/docs/03-tools/05-context.md
Outdated
|
||
```yaml | ||
# my-search-context-tool.gpt | ||
name: search_context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not put name:
as it's not required. I more care about below not using the from
sytnax. So the example below should just be context: ./my-search-context-tool.gpt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the suggested change.
docs/docs/03-tools/05-context.md
Outdated
Continuing with the above example, this is how you can use it in a script: | ||
|
||
```yaml | ||
context: search_context from my-search-context-tool.gpt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to context: ./my-search-context-tool.gpt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the suggested change.
docs/docs/03-tools/05-context.md
Outdated
@@ -0,0 +1,64 @@ | |||
# Context | |||
|
|||
GPTScript supports context provider tools which can be used to provide additional context for tool execution. Output from the context tool gets prepended to the instruction of the current tool that uses the context tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we document that exported tools from a context tools are added to the current tool's tools. (wow that was a bad way to say it). Also can we document that you can just do context: foo.txt
if you just want to add a string. This is a simple way to share prompts across tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following documentation is now added:
GPTScript provides a mechanism to share prompt information across many tools using the tool parameter `context`. It is used to provide additional information to the calling tool on when to use a specific tool by prepending the `context` to the instruction of the calling tool.
- Context can point to a static text or a GPTScript.
- Context tools are just regular GPTScript tools, and any valid gptscript field can be used.
- Exported tools from a context tools are available as tools to the calling tool.
- When context points to a GPTScript tool, output from the context tool gets prepended to the instruction of the calling tool.
docs/docs/03-tools/05-context.md
Outdated
@@ -0,0 +1,64 @@ | |||
# Context | |||
|
|||
GPTScript supports context provider tools which can be used to provide additional context for tool execution. Output from the context tool gets prepended to the instruction of the current tool that uses the context tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't use "context provider tools" in the definition as those are not yet defined.
I think we are trying to convey that context:
- Provides a mechanism to use prompt information across many tools as an import mechanism.
- Provide additional information to the calling tool on when to use a specific tool. (Helpful for using new CLIs for example)
- These can be static txt or dynamic gptscripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following documentation has been added now:'
GPTScript provides a mechanism to share prompt information across many tools using the tool parameter `context`. It is used to provide additional information to the calling tool on when to use a specific tool by prepending the `context` to the instruction of the calling tool.
- Context can point to a static text or a GPTScript.
- Context tools are just regular GPTScript tools, and any valid gptscript field can be used.
- Exported tools from a context tools are available as tools to the calling tool.
- When context points to a GPTScript tool, output from the context tool gets prepended to the instruction of the calling tool.
I would also add a txt example to the docs. Don't actually use this, but it could look like:
Tool1:
Tool2:
Showing you can reduce boiler plate and change behavior quickly |
@cloudnautique I have included an example for multiple tools using txt file as context. |
Add documentation for context