File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -67,4 +67,18 @@ Users are allowed to access the application if one of their verified email addre
67671. Run with docker
6868 ```shell
6969 docker run -p 5050:5050 --env-file .env.docker repository-discovery
70- ```
70+ ```
71+
72+ # Exercise
73+
74+ ## Create a tool
75+
76+ Using the [github rest documentation](https://docs.github.com/en/rest), add a new tool.
77+ 1. In the `github_tools.py` file, define a method that will be used to leverage the api endpoint you have chosen.
78+ 2. Within the method, using the python doc format, add query language for openai to use.
79+ 3. Add the `@tool()` decorator on the method you just defined.
80+ 4. Within the `github_tools.py` file, define a new method for the api call that the tool will leverage to fetch data.
81+ 5. Using the new api call, you defined, fetch the data within the tool and return it as a `json dump`.
82+ 6. Register the new tool by adding it to the list of tools that are returned by the `github_tools` method.
83+
84+ Run the application and see if you can have openapi use your tool to fetch data.
You can’t perform that action at this time.
0 commit comments