Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,9 +26,9 @@ WRITE_ACCESS_TOKEN = st.secrets["Llama_3_1"]
|
|
26 |
|
27 |
def get_rag_answer(query, top_results):
|
28 |
context = "\n\n".join([res.payload["page_content"] for res in top_results])
|
29 |
-
max_context_chars = 23500
|
30 |
-
if len(context) > max_context_chars:
|
31 |
-
|
32 |
prompt = (
|
33 |
"You are a project portfolio adviser at the development cooperation GIZ. "
|
34 |
"Using the following context, answer the question in english precisely. "
|
|
|
26 |
|
27 |
def get_rag_answer(query, top_results):
|
28 |
context = "\n\n".join([res.payload["page_content"] for res in top_results])
|
29 |
+
#max_context_chars = 23500
|
30 |
+
#if len(context) > max_context_chars:
|
31 |
+
# context = context[:max_context_chars]
|
32 |
prompt = (
|
33 |
"You are a project portfolio adviser at the development cooperation GIZ. "
|
34 |
"Using the following context, answer the question in english precisely. "
|