Skip to content

mirage-studio-io/chat-calculator-plugin

Repository files navigation

Plugin development

[plugin-repo]
|- main.py
|- manifest.json
|- openapi.yaml
|- logo.png
`- ... # other

manifest.json

plugin-manifest: Every plugin requires a ai-plugin.json file, which needs to be hosted on the API’s domain.

openapi.yaml

openapi-definition: OpenAPI specification to document the API. The model in ChatGPT does not know anything about your API other than what is defined in the OpenAPI specification and manifest file. This means that if you have an extensive API, you need not expose all functionality to the model and can choose specific endpoints.

Plugin Deploy (Replit)

  • Open Replit and click the Create Repl button.
  • When the pop-up window appears, click the Import from GitHub button in the top right corner.
  • In the GitHub URL field, enter https://github.com/mirage-studio-io/chat-calculator-plugin and select Python as the language.
  • Then click the Import from GitHub button in the bottom right corner and wait for the initialization to complete.
  • Click the Run button and wait for the execution to finish.

CALCULATOR API

Addition

curl -X GET http://0.0.0.0:5002/calculator/add/5.0/3.0 \
 -H 'Content-Type: application/json'

Subtraction

curl -X GET http://0.0.0.0:5002/calculator/subtract/5.0/3.0 \
 -H 'Content-Type: application/json'

Multiplication

curl -X GET http://0.0.0.0:5002/calculator/multiply/5.0/3.0 \
 -H 'Content-Type: application/json'

Division

curl -X GET http://0.0.0.0:5002/calculator/divide/6.0/3.0 \
 -H 'Content-Type: application/json'

Power

curl -X GET http://0.0.0.0:5002/calculator/power/2.0/3.0 \
 -H 'Content-Type: application/json'

Square Root

curl -X GET http://0.0.0.0:5002/calculator/sqrt/9.0 \
 -H 'Content-Type: application/json'

MIT License - Mirage Studio

About

✅ ChatGPT Plugin for performing basic arithmetic operations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages