Using chatGPT
This is an experimental tool. Please check with the team if you have questions.
OpenAI credentials
To run the following steps, add your OpenAI API key to your .env
file. E.g. OPENAI_API_KEY=sk-...
.
We have an experimental tool that uses chatGPT to review our titles and subtitles in our chart revisions. Follow these steps to run it:
- You need to have submitted chart revisions to admin.
- Then, run
You can check all the available options with
poetry run etl-chartgpt
--help
. - This generates new subtitles and titles of the chart revisions and pushes these to the
suggested_chart_revisions
table. It stores these in the columnexperimental
of this same table. - Once this is done running, you can visualise these new subtitles/titles from the admin site. You will see a light blue button showing the model name (
gpt-4
orgpt-3.5-tubo
). Click it to render the config produced by chatGPT. - If you approve while a gpt-based FASTT is rendered, this will be submitted.
Note
- If someone already ran the command, and some charts already have gpt-based titles/subtitles, you can force overwrite these by using the option
--overwrite
. - By default,
gpt-3.5-turbo
is used. Change this with the optionmodel-name
. - We use a custom system prompt, but you can use another one by using the option
--system-prompt
.
Example calls of etl-chartgpt
Only generate chatGPT revisions for me
Only create these for revisions created by you:
poetry run etl-chartgpt -me
Force overwrite new chatGPT revisions
poetry run etl-chartgpt -f
Other options
Generate revision for chart revision with id 123
using model gpt-4
and a custom system prompt stored in custom-system-prompt.txt
file.
poetry run etl-chartgpt -i 123 -n "gpt-4" -t custom-system-prompt.txt