-
Notifications
You must be signed in to change notification settings - Fork 1
Setup
To use Subtitle Corrector you need a valid OpenAI API key. You can create and use an OpenAI api key by logging into your OpenAI account and creating a key on the following page: https://platform.openai.com/api-keys
Once you've got your API key you need to add it to your environment variables.
On UNIX/UNIX-like systems it's easiest to add your API key to the environment as so:
echo 'export OPENAI_API_KEY="insert your key here between the parentheses" >> ~/[shell startup script]
Then run:
source ~/[shell startup script]
Press the start key and type in environment. You will then see the option "Edit the system environment variables". Click it and a GUI will appear, at the bottom there is a button which says "Environment variables..." Click this button and it will take you to a new menu, below the user variables list click "new" and create a new variable with the name "OPENAI_API_KEY" and with its value being the key itself. Click OK, and now you're done.
To use the GUI application, you need a config. The config is simply a .json file containing three values and titled "config.json". `
"model": "[GPT model to be used. GPT4 is recommended as GPT3.5-turbo consistently fails to produce usable output.]",
"prompt_directory": "[Path to directory where prompts are to be stored]",
"tokens_per_query": [Number of tokens per query. A value of 150 is recommended as above a certain value GPT4 will produce bad output.]
If a config does not already exist, you will be prompted whether or not you would like to have one auto-generated for you.
The location of the config is relative to your system:
- Windows: C:\Users\[username]\AppData\Local\subtitle-corrector\config.json
- GNU + Linux: /home/[username]/.config/subtitle-corrector/config.json
- MacOS: ~/Library/Application Support/subtitle-corrector/config.json