Skip to content

Instantly share code, notes, and snippets.

@Curtis-64
Last active November 10, 2023 13:25
Show Gist options
  • Save Curtis-64/f89c7d80302466d4ba1ccf04a142598d to your computer and use it in GitHub Desktop.
Save Curtis-64/f89c7d80302466d4ba1ccf04a142598d to your computer and use it in GitHub Desktop.
OpenAI_Action_Schema
OAI Action / Tool Schema by Curtis White (Prompt Engineer / Senior Solutions Engineer)
// The following is an example OAI schema I was able to get to work with by creating an nGrok path to my ChatGPT Augmentify tool
// For this example you will need my ChatGPT Augentify Python Flask server, ngrok with Edge setup, and create a GPTs action
// Yeah its complicated. End result is ChatGPT with GPTs can run code on your local computer.
// For more info https://twitter.com/BBacktesting/status/1722952136336589138
{
"openapi": "3.1.0",
"info": {
"title": "Code Execution API",
"description": "An API to execute various programming language codes.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://yourlocalserver.ngrok.app"
}
],
"paths": {
"/execute": {
"post": {
"operationId": "executeRemoteCode",
"description": "Remote executes provided code and returns the result.",
"requestBody": {
"description": "Code to execute",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"code": {
"type": "string",
"example": "5+5"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier for the execution request."
},
"result": {
"type": "string",
"description": "The result of the code execution."
}
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment