chore: Änderungen commited
This commit is contained in:
5
app.py
5
app.py
@@ -1544,8 +1544,11 @@ def chat_with_assistant():
|
||||
})
|
||||
|
||||
try:
|
||||
# OpenAI-Client mit dem API-Key initialisieren
|
||||
client = OpenAI(api_key=api_key)
|
||||
|
||||
# Überprüfen ob OpenAI API-Key konfiguriert ist
|
||||
if not client.api_key or client.api_key.startswith("sk-dummy"):
|
||||
if not api_key or api_key.startswith("sk-dummy"):
|
||||
print("Warnung: OpenAI API-Key ist nicht oder nur als Dummy konfiguriert!")
|
||||
return jsonify({
|
||||
'error': 'Der OpenAI API-Key ist nicht korrekt konfiguriert. Bitte konfigurieren Sie die Umgebungsvariable OPENAI_API_KEY.'
|
||||
|
||||
Reference in New Issue
Block a user