Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -445,9 +445,9 @@ def generate_auswahl(prompt, file, chatbot, history, rag_option, model_option, o
|
|
445 |
headers, payload = process_image(file, prompt)
|
446 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
447 |
#als json ausgeben
|
448 |
-
|
449 |
#in Wörterbuch umwandeln
|
450 |
-
data = json.loads(j_string)
|
451 |
# Den "content" auswählen, da dort die Antwort der Ki enthalten ist
|
452 |
result = data['choices'][0]['message']['content']
|
453 |
history = history + [((file,), None),(prompt, result)]
|
|
|
445 |
headers, payload = process_image(file, prompt)
|
446 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
447 |
#als json ausgeben
|
448 |
+
data = response.json()
|
449 |
#in Wörterbuch umwandeln
|
450 |
+
#data = json.loads(j_string)
|
451 |
# Den "content" auswählen, da dort die Antwort der Ki enthalten ist
|
452 |
result = data['choices'][0]['message']['content']
|
453 |
history = history + [((file,), None),(prompt, result)]
|