mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-13 16:43:44 +00:00
Remove hard-coded question field for FAQs
This commit is contained in:
parent
4c2726f7ab
commit
997aafcf62
@ -100,7 +100,7 @@ class Finder:
|
|||||||
# 3) Format response
|
# 3) Format response
|
||||||
for doc in documents:
|
for doc in documents:
|
||||||
#TODO proper calibratation of pseudo probabilities
|
#TODO proper calibratation of pseudo probabilities
|
||||||
cur_answer = {"question": doc.meta["question"], "answer": doc.text, "context": doc.text, # type: ignore
|
cur_answer = {"question": doc.question, "answer": doc.text, "context": doc.text, # type: ignore
|
||||||
"score": doc.query_score, "offset_start": 0, "offset_end": len(doc.text), "meta": doc.meta
|
"score": doc.query_score, "offset_start": 0, "offset_end": len(doc.text), "meta": doc.meta
|
||||||
}
|
}
|
||||||
if self.retriever.embedding_model: # type: ignore
|
if self.retriever.embedding_model: # type: ignore
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user