fix app using gemini when hackclub ai is enabled

This commit is contained in:
csd4ni3l
2025-10-04 19:00:14 +02:00
parent 37a1f6f5dc
commit f92939a526

2
app.py
View File

@@ -255,7 +255,7 @@ def register():
return redirect(url_for("login")) return redirect(url_for("login"))
def ai_prompt(prompt): def ai_prompt(prompt):
if not os.environ.get("USE_HACKCLUB_AI", "true").lower() == "true": if os.environ.get("USE_HACKCLUB_AI", "true").lower() == "true":
response = requests.post( response = requests.post(
"https://ai.hackclub.com/chat/completions", "https://ai.hackclub.com/chat/completions",
headers={"Content-Type": "application/json"}, headers={"Content-Type": "application/json"},