fix: rewoo citation (#441) #none
This commit is contained in:
parent
66e565649e
commit
280f0d58ce
|
@ -271,9 +271,8 @@ class RewooAgentPipeline(BaseReasoning):
|
||||||
|
|
||||||
if "citation" in answer.metadata and answer.metadata["citation"] is not None:
|
if "citation" in answer.metadata and answer.metadata["citation"] is not None:
|
||||||
context = answer.metadata["worker_log"]
|
context = answer.metadata["worker_log"]
|
||||||
for fact_with_evidence in answer.metadata["citation"].answer:
|
for evidence in answer.metadata["citation"].evidences:
|
||||||
for quote in fact_with_evidence.substring_quote:
|
matches = find_text(evidence, context)
|
||||||
matches = find_text(quote, context)
|
|
||||||
for match in matches:
|
for match in matches:
|
||||||
split_indices.append(match[0])
|
split_indices.append(match[0])
|
||||||
split_indices.append(match[1])
|
split_indices.append(match[1])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user