editoReview

[Tools API] CODE RUNNER

Run and Save your code while creating visualizations (charts and graphs) supports upto 70 programming languages.

CODE RUNNER

Vand ID: vand-c6c90c1d-4d09-4ad5-817d-346a61cf9153

Learn how to easily use the Code Runner tool with the OpenAI API.

Run and Save your code while creating visualizations (charts and graphs) supports upto 70 programming languages.

OpenAI function calls:

{
  "name": "runCode",
  "description": "Run code",
  "parameters": {
    "type": "object",
    "properties": {
      "code": {
        "type": "string",
        "description": "The code to be run."
      },
      "language": {
        "type": "string",
        "description": "The programming language code."
      }
    },
    "required": [
      "code",
      "language"
    ]
  }
}
{
  "name": "saveCode",
  "description": "Save code",
  "parameters": {
    "type": "object",
    "properties": {
      "filename": {
        "type": "string",
        "description": "The name of the file."
      },
      "code": {
        "type": "string",
        "description": "The code to be saved."
      }
    },
    "required": [
      "filename",
      "code"
    ]
  }
}
{
  "name": "downloadFile",
  "description": "Download file",
  "parameters": {
    "type": "object",
    "properties": {
      "filename": {
        "type": "string",
        "description": ""
      }
    },
    "required": [
      "filename"
    ]
  }
}
{
  "name": "help",
  "description": "Help",
  "parameters": {
    "type": "object",
    "properties": {},
    "required": []
  }
}
{
  "name": "creditLimit",
  "description": "Get Credits limit",
  "parameters": {
    "type": "object",
    "properties": {},
    "required": []
  }
}
{
  "name": "uploadFile",
  "description": "Upload file with filename and data",
  "parameters": {
    "type": "object",
    "properties": {
      "filename": {
        "type": "string",
        "description": "The name of the file."
      },
      "data": {
        "type": "string",
        "description": "The data to be uploaded."
      }
    },
    "required": [
      "filename",
      "data"
    ]
  }
}
{
  "name": "quickChart",
  "description": "Create a quick chart",
  "parameters": {
    "type": "object",
    "properties": {
      "chart_type": {
        "type": "string",
        "description": "The type of the chart."
      },
      "labels": {
        "type": "string",
        "description": "The labels for the chart."
      },
      "datasets": {
        "type": "array",
        "description": ""
      }
    },
    "required": [
      "chart_type",
      "labels",
      "datasets"
    ]
  }
}

Auth Type

none

Servers

httpscode-runner.heavenplugins.com

OpenAPI:

{
  "openapi": "3.0.0",
  "info": {
    "title": "Code Runner",
    "version": "1.0",
    "description": "Run and Save your code while creating visualizations (charts and graphs) supports upto 70 programming languages."
  },
  "paths": {
    "/run_code": {
      "post": {
        "summary": "Run code",
        "operationId": "runCode",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Code"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Code output"
          }
        }
      }
    },
    "/save_code": {
      "post": {
        "summary": "Save code",
        "operationId": "saveCode",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeFile"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Code saved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "download_link": {
                      "type": "string",
                      "example": "/download/hello_world.cpp"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/download/{filename}": {
      "get": {
        "summary": "Download file",
        "operationId": "downloadFile",
        "parameters": [
          {
            "name": "filename",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "hello_world.cpp"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File downloaded"
          }
        }
      }
    },
    "/help": {
      "get": {
        "summary": "Help",
        "operationId": "help",
        "responses": {
          "200": {
            "description": "Help",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/credit_limit": {
      "get": {
        "summary": "Get Credits limit",
        "operationId": "creditLimit",
        "responses": {
          "200": {
            "description": "Credits limit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/upload": {
      "post": {
        "summary": "Upload file with filename and data",
        "operationId": "uploadFile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileData"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File uploaded and saved in database",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "download_link": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/quick_chart": {
      "post": {
        "summary": "Create a quick chart",
        "operationId": "quickChart",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "chart_type",
                  "labels",
                  "datasets"
                ],
                "properties": {
                  "chart_type": {
                    "type": "string",
                    "description": "The type of the chart."
                  },
                  "labels": {
                    "type": "string",
                    "description": "The labels for the chart."
                  },
                  "datasets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "label",
                        "data"
                      ],
                      "properties": {
                        "label": {
                          "type": "string",
                          "description": "The label for the dataset."
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "integer"
                          },
                          "description": "The data for the dataset."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Chart created",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "object",
                    "properties": {
                      "chart_link": {
                        "type": "string",
                        "description": "The link to the created chart."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Code": {
        "type": "object",
        "required": [
          "code",
          "language"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "The code to be run."
          },
          "language": {
            "type": "string",
            "description": "The programming language code."
          }
        }
      },
      "CodeFile": {
        "type": "object",
        "required": [
          "filename",
          "code"
        ],
        "properties": {
          "filename": {
            "type": "string",
            "description": "The name of the file."
          },
          "code": {
            "type": "string",
            "description": "The code to be saved."
          }
        }
      },
      "FileData": {
        "type": "object",
        "required": [
          "filename",
          "data"
        ],
        "properties": {
          "filename": {
            "type": "string",
            "description": "The name of the file."
          },
          "data": {
            "type": "string",
            "description": "The data to be uploaded."
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "httpscode-runner.heavenplugins.com"
    }
  ]
}

Be the first to add an editorial review.

Please, login to leave an Editorial Review if you passed the pre-qualifier quiz
Enrolled: 0 patrons
Level: Business
Toggle