Update app.py
Browse files
app.py
CHANGED
@@ -35,10 +35,10 @@ def answer_question(question):
|
|
35 |
|
36 |
# 正确处理 docs_and_scores 列表
|
37 |
context = "\n".join([doc.page_content for doc, _ in docs_and_scores]) # 使用 join() 方法
|
38 |
-
|
39 |
|
40 |
prompt = f"请根据以下知识库回答问题:\n{context}\n问题:{question}"
|
41 |
-
|
42 |
|
43 |
answer = llm(prompt)
|
44 |
return answer
|
|
|
35 |
|
36 |
# 正确处理 docs_and_scores 列表
|
37 |
context = "\n".join([doc.page_content for doc, _ in docs_and_scores]) # 使用 join() 方法
|
38 |
+
print(context)
|
39 |
|
40 |
prompt = f"请根据以下知识库回答问题:\n{context}\n问题:{question}"
|
41 |
+
print(prompt)
|
42 |
|
43 |
answer = llm(prompt)
|
44 |
return answer
|