- Can answer questions about DeFiChain.
- Can get live blockchain data.
- Retrieve relevant documents from the
DeFiChainWiki
Qdrant vector database to provide ChatGPT with relevant information.- Get a query from ChatGPT.
- Embed the query with the OpenAI API.
- Retrieve similar documents from the
DeFiChainWiki
Qdrant vector database.
- Use Ocean API under the hood for blockchain data.
- This ist till in the works.
- API is written in Python using Flask.
- Containerized using Docker.
- Deployed on Fly.io.
The following components are key to the implementation of the plugin.
- Source:
.well-known/ai-plugin.json
- Live at: https://defichain-chatgpt-plugin.fly.dev/.well-known/ai-plugin.json
- Docs: https://platform.openai.com/docs/plugins/getting-started/plugin-manifest
- Source:
.well-known/openapi.yaml
- Live at: https://defichain-chatgpt-plugin.fly.dev/.well-known/openapi.yaml
- To test: Swagger Editor
- Docs: https://platform.openai.com/docs/plugins/getting-started/openapi-definition
python -m venv venv
.\venv\Scripts\activate
Deactivate
We use Docker to package and run the Plugin API. This makes the deployment more reliable and easier.
When deploying to Fly.io, we don't use Docker commands ourselves. The generation of the Docker image is done by Fly.io.
docker build -t defichain-chatgpt-plugin .
docker container run --name DeFiChain_ChatGPT_Plugin --env-file .env -d -p 8080:8080 defichain-chatgpt-plugin