Much of the internet is powered by RESTful APIs. Giving GPT the ability to call them opens up a world of possibilities. This notebook demonstrates how GPTs can be used to intelligently call APIs. It leverages OpenAPI specifications and chained function calls.
The OpenAPI Specification (OAS) is a universally accepted standard for describing the details of RESTful APIs in a format that machines can read and interpret. It enables both humans and computers to understand the capabilities of a service, and it can be leveraged to show GPT how to call APIs.
This notebook is divided into two main sections:
- How to convert a sample OpenAPI specification into a list of function definitions for the chat completions API.
- How to use the chat completions API to intelligently invoke these functions based on user instructions.
We recommend familiariazing yourself with function-calling before proceding.