Experimental project to wrap Coinpaprika API to graphql and integrating it with LLM to get graphql query from user questions
- Add your OPENAI_API_KEY to .env file
- Run yarn install
- You can run graphql server and run answer script to get answers to your crypto queries from GPT with help of coinpaprika. check out the commands below
This runs coinpaprika graphql wrapper server
yarn graphql
Get queries from LLM (Make sure graphql server is running as well)
yarn answer -q "What is price of Bitcoin"
We are copying openapi folder from https://github.com/coinpaprika/coinpaprika.github.io. incase there is a update there we can generate graphql schema by this script
yarn gen:resolve && yarn gen:graphql
- coinpaprika openapi spec docs have $ref declarations to split documentation to many files which is not supported by swagger-to-graphql tool. So we are resolving all $ref to one full big json and saving it.
- We are generating graphql schema from swagger-to-graphql tool by referencing the resolved json file