Skip to content

hpharmsen/tutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language tutor

Basic REPL to chat with the GPT models and a specific implemention that uses these models to help you learn a new language.

Installation

  1. Install dependencies:
python -m pip install -r requirements.in
  1. Create an OpenAI acccount here
  2. Create OpenAI api keys here
  3. Create a .env file with the following content:
OPENAI_API_KEY=your-openai-api-key
OPENAI_ORGANIZATION=your-openai-organization-id

Usage

python tutor.py

Generates sentences in English and lets you translate them. The program then checks if your translation is correct and gives you feedback.

Other languages

The current implementation is for Spanish but you can easily set a new language in settings.ini.

Just make sure you include a section with the same name as the language and translate the [Spanish] section into that language.

Special commands

You can also use these special commands which each start with a colon:

Syntax Description
:reset resets the conversation
:load name loads the saved conversation with the specified name
:save name saves the conversation under the specified name
:model gpt-4 Sets the AI model
:max_tokens 800 The maximum number of tokens to generate in the completion
:exit or :quit quits the program

About

Language tutor using GPT(4)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages