From b283418879f4abef2ec0f6417d04363e4cb4ea4f Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:43:11 -0400 Subject: [PATCH] fix: correct indentation in _call_anthropic_api else-block (#105) --- routes/deckgen.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/routes/deckgen.py b/routes/deckgen.py index bedda26..6ccdf91 100644 --- a/routes/deckgen.py +++ b/routes/deckgen.py @@ -861,19 +861,19 @@ async def _call_anthropic_api(messages: list[dict], max_tokens: int = 4096, temp else: if not CFG.anthropic_api_key: raise HTTPException(400, 'Anthropic Claude API key not configured. Set anthropic_api_key env var or --anthropic-key.') - base_url = 'https://api.anthropic.com' - model = ANTHROPIC_MODEL - headers = { + base_url = 'https://api.anthropic.com' + model = ANTHROPIC_MODEL + headers = { 'Content-Type': 'application/json', 'x-api-key': CFG.anthropic_api_key, 'anthropic-version': '2023-06-01', - } + } # Separate system messages for Anthropic API format system_msgs = [m['content'] for m in messages if m.get('role') == 'system'] user_msgs = [m for m in messages if m.get('role') != 'system'] system_text = '\n'.join(system_msgs) if system_msgs else None -payload = { + payload = { 'model': model, 'messages': user_msgs, 'max_tokens': max_tokens,