https://github.com/aelfproject/chatgpt-actions
aelf's ChatGPT actions
https://github.com/aelfproject/chatgpt-actions
Last synced: 30 days ago
JSON representation
aelf's ChatGPT actions
- Host: GitHub
- URL: https://github.com/aelfproject/chatgpt-actions
- Owner: AElfProject
- Created: 2024-07-09T08:27:41.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-12T02:47:54.000Z (almost 2 years ago)
- Last Synced: 2024-07-12T03:52:40.208Z (almost 2 years ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project Summary
In this repo, you'll find the following for aelf Smart Contract Copilot GPT:
- **chatgpt-api/api.py**: A simple Flask program written to retrieve information from external APIs.
- **openapi.yaml**: The OpenAPI specification with details about your API so ChatGPT understands what it does.
# Prerequisites
- Python 3.7+
- [Flask](https://flask.palletsprojects.com/en/3.0.x/installation/)
# Running the application
- Setup environment
```bash
cd chatgpt-api
python3 -m venv .venv
. .venv/bin/activate
```
- Setup environmental variables
```bash
export CMC_API_KEY=
```
- Install the requirements
```bash
pip install -r requirements.txt
```
- Run
```bash
flask --app api run
```
# Endpoints
/get-chains
Get a list of supported chains.
/get-balance
Get the balance of an address in the corresponding chain.
/get-price
Get the price of a cryptocurrency.
/get-transaction-result
Get the result of a transaction in a specific chain.
/get-block-height
Get the current block height in a specific chain.
/block-by-height
Get block information by block height in a specific chain.
/get-transactions-by-address
Get transactions by address in a specific chain. Default value of page is 0.