ToolBlox
ToolBlox · GPT-Aktionen
Toolblox Plugin
Plugin for creating smart-contract workflows or ERC-20 tokens.
POST /GenerateUsers can describe in free text (not structured json) their flow by issuing statements like 'Create a workflow that manages sales orders within a department'. Content should describe some kind of process, activity or scenario.POST /Token/GenerateIf users want to create a token of the ERC-20 variety. They should provide token name (at least 5 characters) and the symbol (three to five characters).
Ursprüngliches API-Schema
{
"openapi": "3.0.1",
"info": {
"title": "Toolblox Plugin",
"description": "Plugin for creating smart-contract workflows or ERC-20 tokens.",
"version": "v1"
},
"servers": [
{
"url": "https://toolbloxfunctions.azurewebsites.net/api"
}
],
"paths": {
"/Generate": {
"post": {
"operationId": "generate",
"summary": "Users can describe in free text (not structured json) their flow by issuing statements like 'Create a workflow that manages sales orders within a department'. Content should describe some kind of process, activity or scenario.",
"parameters": [
{
"in": "query",
"name": "apiKey",
"schema": {
"type": "string"
},
"required": false,
"description": "The api key to identify the current user. API keys can be generated in https://app.toolblox.net/profile If API key is not know, ask the user and mention the URL (https://app.toolblox.net/profile ) where he can generate one easily."
},
{
"in": "query",
"name": "id",
"schema": {
"type": "string"
},
"required": false,
"description": "If the user issues an update statement like 'Add a verification step to workflow' or 'update the workflow to include a client approval' then the id must be filled with the id returned in the previous call to Generate (field id)."
},
{
"in": "query",
"name": "user",
"schema": {
"type": "string"
},
"required": true,
"description": "contains unique id of the user logged into chat.openai.com. From variable $userIDString"
}
],
"requestBody": {
"description": "This is the content in free text (NOT structured json) describing the workflow. It can contain statements like 'Create a workflow that manages sales orders within a department'. Users need to describe an asset, its lifecycle and the stakeholders but even if some info is missing, it is a valid input. As long as it seems to describe some kind of process, activity or scenario. Optionally users can specify a token symbol and address to make the workflow use the token as payment instead of default crypto currency - for example \"Create a user profile smart contract and use my token SHOP1 with address 0xF6010aED3C0e1118DC69D019719344A4242ef879 to pay 10 tokens for each registration\".",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "Create a workflow for a coffee production - operated by the producer - starting with harvest, processing and packaging. Also add a step where the regulators can certify the quality."
}
}
}
},
"text/plain": {
"examples": {
"user": {
"summary": "Just some free form text, exactly the same as the user input.",
"value": "Create a workflow for a coffee production - operated by the producer - starting with harvest, processing and packaging. Also add a step where the regulators can certify the quality."
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/generateResponse"
}
}
}
}
}
}
},
"/Token/Generate": {
"post": {
"operationId": "generatetoken",
"summary": "If users want to create a token of the ERC-20 variety. They should provide token name (at least 5 characters) and the symbol (three to five characters).",
"parameters": [
{
"in": "query",
"name": "apiKey",
"schema": {
"type": "string"
},
"required": false,
"description": "The api key to identify the current user. API keys can be generated in https://app.toolblox.net/profile. This is not mandatory."
},
{
"in": "query",
"name": "user",
"schema": {
"type": "string"
},
"required": true,
"description": "contains unique id of the user logged into chat.openai.com. From variable $userIDString"
}
],
"requestBody": {
"description": "This is the content in free text (NOT structured json) describing the workflow. It can contain statements like 'Create a workflow that manages sales orders within a department'. Users need to describe an asset, its lifecycle and the stakeholders but even if some info is missing, it is a valid input. As long as it seems to describe some kind of process, activity or scenario.",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "My shop loyalty points token"
},
"symbol": {
"type": "string",
"example": "SHOP"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/tokenGenerateResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"generateResponse": {
"type": "object",
"properties": {
"currentUsage": {
"type": "integer",
"format": "int32",
"description": "The API usage of this account in the current calendar month."
},
"url": {
"type": "string",
"description": "URL containing the newly built or altered smart-contract."
},
"id": {
"type": "string",
"description": "Id of the smart-contract which was created or altered."
},
"imageUrl": {
"type": "string",
"description": "Screenshot of the smart contract workflow in PNG format - please show this to user to make it easier to understand the content of the workflow."
},
"spec": {
"type": "string",
"description": "Internal system representation that describes the entire result of the smart contract which was generated. This field is not understandable by humans and needs to be summarized."
}
}
},
"tokenGenerateResponse": {
"type": "object",
"properties": {
"decimals": {
"type": "integer",
"format": "int32",
"description": "How many decimals the token has."
},
"url": {
"type": "string",
"description": "URL containing the newly built token."
},
"standard": {
"type": "string",
"description": "The ERC token standard used."
},
"id": {
"type": "string",
"description": "Id of the token which was created."
},
"symbol": {
"type": "string",
"description": "The symbol of the token created."
},
"address": {
"type": "string",
"description": "The blockchain address that can be used to communicate with the token contract."
}
}
}
}
}
}