|
| 1 | +# GPT Action Library: Tray.ai API Management Operations |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This page provides an instruction & guide for developers building a set of GPT Actions across a set of applications. Before you proceed, make sure to first familiarize yourself with the following information: |
| 6 | +- [Introduction to GPT Actions](https://platform.openai.com/docs/actions) |
| 7 | +- [Introduction to GPT Actions Library](https://platform.openai.com/docs/actions/actions-library) |
| 8 | +- [Example of Building a GPT Action from Scratch](https://platform.openai.com/docs/actions/getting-started) |
| 9 | + |
| 10 | +This particular GPT Action(s) provides an overview of how to connect to a **Tray.ai API Management Operations**. |
| 11 | + |
| 12 | +### Value + Example Business Use Cases |
| 13 | + |
| 14 | +**Value**: Users can now leverage ChatGPT's natural language capability to connect directly to APIs created through API Management in Tray.ai. |
| 15 | + |
| 16 | +**Example Use Cases**: |
| 17 | +- Tray.ai is a middleware that composes workflows, handles workflow action scaling, and interfaces with hundreds of 3rd party APIs |
| 18 | +- You have a custom operation running in Tray.ai workflow(s) that you'd like to incorporate into a GPT. |
| 19 | +- You would like to govern access to actions for your organization/team under a single API interface |
| 20 | + |
| 21 | +## Application Information |
| 22 | + |
| 23 | +### Application Key Links |
| 24 | + |
| 25 | +Check out these links from the application before you get started: |
| 26 | +- Application Website: https://tray.ai/universal-automation-cloud/api-management |
| 27 | +- Application API Documentation: https://tray.ai/documentation/tray-uac/api-management/api-management-overview/ |
| 28 | + |
| 29 | +### Application Prerequisites |
| 30 | + |
| 31 | +Before you get started, make sure you go through the following steps in your Tray.ai environment: |
| 32 | +- Set up a Tray.ai account |
| 33 | +- Create a project with a set of simple API Management Operations |
| 34 | + |
| 35 | +### Application Workflow Steps |
| 36 | + |
| 37 | +Below is an example of a building and extending a basic set of API Management operations:\ |
| 38 | + |
| 39 | + |
| 40 | +## ChatGPT Steps |
| 41 | + |
| 42 | +### Custom GPT Instructions |
| 43 | + |
| 44 | +Once you've created a Custom GPT, you should add Instructions to the GPT providing context about the GPTs role, and the actions it is able to perform. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail. |
| 45 | + |
| 46 | +### OpenAPI Schema |
| 47 | + |
| 48 | +Once you've created a Custom GPT, download the API specification from your Tray.ai project, copy the contents, and paste it into your Custom GPT action |
| 49 | +schema. Once pasted, update your schema's `openapi` property to version `3.1.0`. |
| 50 | + |
| 51 | +Below are instructions on setting up authentication with this 3rd party application. Have questions? Check out [Getting Started Example](https://platform.openai.com/docs/actions/getting-started) to see how this step works in more detail. |
| 52 | + |
| 53 | +### Pre-Action Steps |
| 54 | + |
| 55 | +Before you set up authentication in ChatGPT, please take the following steps in the application: |
| 56 | +- Create a new role with the name `full` |
| 57 | +- Create a new policy specifying name, operations to allow, and policy rules with `"Authentication" == True` and role is `full` |
| 58 | +- Create a new client with roles set to `full` |
| 59 | +- Save your API Token for future steps |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +### In ChatGPT |
| 65 | + |
| 66 | +In ChatGPT, click on "Authentication" and choose **"API Key"**. Enter in the information below. |
| 67 | + |
| 68 | +- **API Key**: (Paste your API Key provided by the Tray.ai API Management Client) |
| 69 | +- **Auth Type**: Bearer |
| 70 | + |
| 71 | +### FAQ & Troubleshooting |
| 72 | + |
| 73 | +- *Auth/Forbidden Error:* Ensure you have properly entered your API key and have set the `Auth Type` as `Bearer`. |
| 74 | +- *Tray.ai Internal Error:* You can configure responses back to your CustomGPT configuring error handling and responding back with error messages. |
0 commit comments