-
Notifications
You must be signed in to change notification settings - Fork 7
Creating a Hello World prompt tool
Creating a new "tool" in Octopus Copilot simply means you want to include additional functionality to handle another prompt case.
In this exercise, we'll create a tool that responds to prompts like:
Hello world!
The first thing to do is navigate to the tools
folder in the project. This folder contains the tools that are executed when OpenAI matches a prompt created by a user to one of the tools that reside here.
The tools are further categorized by the types of the tools. For example, we have tools that are classified under:
-
CLI: These tools live in the
cli
folder. They are executed from the command line. See this section for an example. -
Generic: These tools live in the
generic
folder and aren't specific to any particular context (with regards to how they are called) -
GitHub Actions: These tools live in the
githubactions
folder. These are where most of the tools live today, as users originally interacted with the tools via the GitHub Copilot chat window in VS Code or Jetbrains Rider, etc.
Note
You might have noticed that there is a wrapper
folder too. To separate the implementation of the prompt handler from its definition, we add slim function definitions in this folder. In nearly all cases, they execute a callback to the actual implementation and add some basic comments to help OpenAI make the right selection when choosing a tool, e.g., by providing sample prompts it should use.