sxflynn / TeacherGPT

A proposed GPT chatbot for teachers that uses retrieval-augmentation to answer questions about their students.
MIT License
8 stars 1 forks source link

Migrating to Jinja2 for managing prompt template #6

Closed sxflynn closed 5 months ago

sxflynn commented 5 months ago

Originally, I used a .toml file to store template strings. The problem was the difficult in injecting variables into prompts. This PR migrates all the references to the toml file to a TemplateManager class using Jinja2 where it's possible to add string variables inside a prompt.

Some other related work in this PR that was enabled by the Jinaj2 mirgation was injecting a student context string block into the orchestrator template. See references to list_of_people