Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/strickvl/mathsprompt
https://github.com/strickvl/mathsprompt
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/strickvl/mathsprompt
- Owner: strickvl
- License: gpl-3.0
- Created: 2023-07-22T13:49:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-25T19:20:52.000Z (about 1 year ago)
- Last Synced: 2024-05-02T04:17:38.275Z (8 months ago)
- Language: Rust
- Size: 134 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MathsPrompt
A simple tool that schedules maths problems to be solved.
Read [the associated blog](https://mlops.systems/posts/2023-07-23-maths-prompt-rust-project.html) for more context on the project, why I built it and how it works technically.
## Input Questions
For the initial input of basis questions, spin up the Rust server from the base
directory with a simple `cargo run`. This will start the server on port 8000.Then, open the file at `frontend/index.html` in your browser. (You'll want to
set your database URL using the `MATHSPROMPT_DATABASE_URL` environment variable,
and you'll want to set your OpenAI API key using the `OPENAI_API_KEY`
environment variable.)## Question Variant Autogeneration
When a question is successfully input into the Postgres database, the server
then queries the OpenAI API to generate a number of variants of the question.
These are then inserted into the database as well (with a label to indicate that
they have been autogenerated).## Setting up the database
You can set up the database by using the SQL commands in `database/create_tables.sql`.