Update app.py
Browse files
app.py
CHANGED
@@ -390,6 +390,7 @@ def rag_chain2(prompt, db, k=3):
|
|
390 |
neu_prompt = rag_template
|
391 |
for i, chunk in enumerate(retrieved_chunks):
|
392 |
neu_prompt += f"{i+1}. {chunk}\n"
|
|
|
393 |
print(neu_prompt)
|
394 |
return neu_prompt
|
395 |
|
@@ -518,7 +519,8 @@ def generate_text_zu_bild(file, prompt, k, rag_option):
|
|
518 |
#prompt = generate_prompt_with_history_openai(neu_text_mit_chunks, history)
|
519 |
#als reiner prompt:
|
520 |
prompt_neu = generate_prompt_with_history(neu_text_mit_chunks, history)
|
521 |
-
|
|
|
522 |
headers, payload = process_image(file, prompt_neu)
|
523 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
524 |
#als json ausgeben
|
|
|
390 |
neu_prompt = rag_template
|
391 |
for i, chunk in enumerate(retrieved_chunks):
|
392 |
neu_prompt += f"{i+1}. {chunk}\n"
|
393 |
+
print("prompt mit chunks....................")
|
394 |
print(neu_prompt)
|
395 |
return neu_prompt
|
396 |
|
|
|
519 |
#prompt = generate_prompt_with_history_openai(neu_text_mit_chunks, history)
|
520 |
#als reiner prompt:
|
521 |
prompt_neu = generate_prompt_with_history(neu_text_mit_chunks, history)
|
522 |
+
print("hier.......................")
|
523 |
+
print(prompt_neu)
|
524 |
headers, payload = process_image(file, prompt_neu)
|
525 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
526 |
#als json ausgeben
|