Spaces:
Running
Running
Update model.py
Browse files
model.py
CHANGED
|
@@ -1155,6 +1155,7 @@ async def query_document_info(niche_cases, query_word, alternative_query_word, s
|
|
| 1155 |
run_rag = True
|
| 1156 |
if run_rag:
|
| 1157 |
print("try run rag")
|
|
|
|
| 1158 |
# Determine the phrase for LLM query
|
| 1159 |
rag_query_phrase = ""
|
| 1160 |
if query_word.lower() != "unknown":
|
|
@@ -1310,7 +1311,9 @@ async def query_document_info(niche_cases, query_word, alternative_query_word, s
|
|
| 1310 |
]
|
| 1311 |
results = await asyncio.gather(*tasks)
|
| 1312 |
# combine results
|
|
|
|
| 1313 |
for context, new_all_output, new_chunk in results:
|
|
|
|
| 1314 |
context_for_llm += new_all_output
|
| 1315 |
context_for_llm += new_chunk
|
| 1316 |
print("len of context after merge all: ", len(context_for_llm))
|
|
|
|
| 1155 |
run_rag = True
|
| 1156 |
if run_rag:
|
| 1157 |
print("try run rag")
|
| 1158 |
+
context_for_llm = ""
|
| 1159 |
# Determine the phrase for LLM query
|
| 1160 |
rag_query_phrase = ""
|
| 1161 |
if query_word.lower() != "unknown":
|
|
|
|
| 1311 |
]
|
| 1312 |
results = await asyncio.gather(*tasks)
|
| 1313 |
# combine results
|
| 1314 |
+
print("get results for context_for_llm")
|
| 1315 |
for context, new_all_output, new_chunk in results:
|
| 1316 |
+
print("inside new results")
|
| 1317 |
context_for_llm += new_all_output
|
| 1318 |
context_for_llm += new_chunk
|
| 1319 |
print("len of context after merge all: ", len(context_for_llm))
|