in app/app.py [0:0]
def format_system_message(language: str, history: list):
system_message = [
{
"role": "system",
"content": LANGUAGES.get(language, LANGUAGES["English"]),
}
]
if history and history[0]["role"] == "system":
history = history[1:]
history = system_message + history
return history