提示词库/填空即用的框架/Function-calling with an OpenAPI specification
Function-calling with an OpenAPI specification
exp-0441未验证
# Function-calling with an OpenAPI specification
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)](https://swagger.io/specification/) 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:
1. How to convert a sample OpenAPI specification into a list of function definitions for the chat completions API.
2. How to use the chat completions API to intelligently invoke these functions based on user instructions.
We recommend familiarizing yourself with [function-calling](./How_to_call_functions_with_chat_models.ipynb) before proceeding.