Spaces:
Running
Running
Commit Β·
38700c8
1
Parent(s): 25e2686
fix: strip trailing newline from GROQ_API_KEY before using in HTTP header
Browse files
agent/reflection_agent.py
CHANGED
|
@@ -469,7 +469,7 @@ def _call_llm(
|
|
| 469 |
# ββ Groq via httpx directly (most reliable in containerised envs) ββββββ
|
| 470 |
if client is None and provider == "groq":
|
| 471 |
import httpx
|
| 472 |
-
api_key = os.environ.get("GROQ_API_KEY") or settings.groq_api_key
|
| 473 |
if not api_key:
|
| 474 |
raise ValueError("GROQ_API_KEY is not set. Add it as an env var or HF Space secret.")
|
| 475 |
|
|
|
|
| 469 |
# ββ Groq via httpx directly (most reliable in containerised envs) ββββββ
|
| 470 |
if client is None and provider == "groq":
|
| 471 |
import httpx
|
| 472 |
+
api_key = (os.environ.get("GROQ_API_KEY") or settings.groq_api_key).strip()
|
| 473 |
if not api_key:
|
| 474 |
raise ValueError("GROQ_API_KEY is not set. Add it as an env var or HF Space secret.")
|
| 475 |
|