Backend part of https://askmybook.lukicenturi.vercel.app/
Frontend Repository: https://github.com/lukicenturi/askmybook_frontend
-
Create and fill in .env using .env.example as an example.
-
Install dependencies
bundle install
- Turn your PDF into embeddings for GPT-3:
# Open rails console
rails console
# Call the service to turn the PDF into embeddings
EmbeddingService.generate("files/book/book.pdf")
- Setup database tables
rails db:migrate
- Run the server locally
rails s
- Ask a question
https://localhost:3000/ask?question=When+was+the+book+published