Skip to content

A console app, and future hosted service, for the generation of French language quizzing problems based on language features. Also, my first time writing in Python beyond simple tooling scripts. It will back a mobile app I've already made if it ends up working out.

License

Notifications You must be signed in to change notification settings

beverage/OpenAIDatabaseTests

Repository files navigation

This repository is poorly named (it has grown way beyond its original scope), and will be renamed.

linting: pylint Buymeacoffee

OpenAI Language Quiz Generator

A tool to provide quizzing material for a variety of French language features, and provide feedback for its learners. What is seen here is it in its command-line application form, but what is within can be consumed by client applications later after further refinement.

Example

This example is highly rate-limited and with randomised features.

While the overall correctness for right answers has been verified, some of the answers are not always ideomatic (around 10% of the time) given that they are generated with no surrounding context. This is unavoidable for the time being.

Getting started

Right now it is a simple Python app, installable from the command line via Poetry:

    python -m pip install --upgrade pip
    pip install poetry
    poetry install

This app will additiionally require a postgresql database, and an OpenAI API key in your environment. (This will be configurable, and hidden later.)

    # It is probably better to put this into a dotfile:
    export $OPENAI_API_KEY=...

A postgresql database is then required, however this is already configured in a docker-compose.yml:

    # From the root directory of the repo:
    docker-compose up

Better secrets management for both the OpenAI keys and database passwords will be coming shortly when the effort to cloud host this as an API will be undertaken.

Once running, you will need to pre-populate the database with a minimal verb set before any sentence or problem generation. To do that, run the following:

    dbtest database init

From there the application is ready to start generating problem data from the command line. See the documentation below.

Command Line Usage

Webserver

This project intends to back services behind a mobile app that already exists, so coming soon.

Examples

Roadmap

About

A console app, and future hosted service, for the generation of French language quizzing problems based on language features. Also, my first time writing in Python beyond simple tooling scripts. It will back a mobile app I've already made if it ends up working out.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages