Skip to content

Using GPT-3 to query AEAT documentation about Renta 2022

Notifications You must be signed in to change notification settings

existeundelta/rentagpt

 
 

Repository files navigation

Renta GPT

RentaGPT is a search engine inspired by perplexity.ai and focused in provide answers related to the Spanish Taxes (Renta 2022).

If you have any questions, feel free to reach out to me on Twitter.

RentaGPT.com

Blog Post

How it works

RentaGPT has a vector database that stores information about the context. The information has been crawled from the AEAT site, cleaned up, and stored as vector embeddings to make it possible to run semantic searches through it.

Given a query, RentaGPT fetches relevant information from the database, and then it prompts OpenAI GPT-3 API to generate an answer from the more relevant documents found in the initial step.

How to deploy to fly.io

Create an account to fly.io

First configure the app:

fly launch

Deploy the app to your account:

flyctl deploy --remote-only

Setup some server parameters to make it work properly:

flyctl ips allocate-v4
flyctl scale memory 1024

Set secrets.

fly secrets set API__PORT=8080
fly secrets set API__HOST=0.0.0.0
fly secrets set CHROMA__COLLECTION_NAME="renta22"
fly secrets set PROVIDERS__OPENAI__API_KEY="sk-YOUR_OPENAI_API_KEY"

Note about secrets: the openai_api_key is only used during the ingestion process

Requirements

Get OpenAI API key here.

Credits

Shoutout to Clarity AI for the frontend inspiration.

About

Using GPT-3 to query AEAT documentation about Renta 2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 85.0%
  • Python 8.1%
  • TypeScript 6.5%
  • Makefile 0.3%
  • JavaScript 0.1%
  • Procfile 0.0%