Fix incorrect string formatting for model payload key

Replaced curly brackets with direct reference to the environment variable in the payload model value. This ensures the correct model is passed dynamically from environment configurations.
This commit is contained in:
ThomasTaroni 2025-06-21 21:54:29 +02:00
parent 5799319ade
commit cfc124915f

View file

@ -33,7 +33,7 @@ async def summarize_to_words(text: str, title: str, target_word_count: int = 100
"Content-type": "application/json",
}
payload = {
"model": {os.getenv('SWISSDOX_SUMMARIZING_MODEL', '')},
"model": os.getenv('SWISSDOX_SUMMARIZING_MODEL', ''),
"messages": [
{
"role": "text summarizer",