Update app.py
Browse files
app.py
CHANGED
|
@@ -31,9 +31,10 @@ except Exception as e:
|
|
| 31 |
def answer_question(question):
|
| 32 |
try:
|
| 33 |
question_embedding = embeddings.embed_query(question)
|
| 34 |
-
docs_and_scores = db.similarity_search_with_score(question_embedding)
|
| 35 |
-
|
| 36 |
return ""
|
|
|
|
|
|
|
|
|
|
| 37 |
# # 正确处理 docs_and_scores 列表
|
| 38 |
# context = "\n".join([doc.page_content for doc, _ in docs_and_scores]) # 使用 join() 方法
|
| 39 |
# print(context)
|
|
|
|
| 31 |
def answer_question(question):
|
| 32 |
try:
|
| 33 |
question_embedding = embeddings.embed_query(question)
|
|
|
|
|
|
|
| 34 |
return ""
|
| 35 |
+
# docs_and_scores = db.similarity_search_with_score(question_embedding)
|
| 36 |
+
|
| 37 |
+
# return ""
|
| 38 |
# # 正确处理 docs_and_scores 列表
|
| 39 |
# context = "\n".join([doc.page_content for doc, _ in docs_and_scores]) # 使用 join() 方法
|
| 40 |
# print(context)
|