Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyeh committed Aug 19, 2024
1 parent d78e3c9 commit 08297f9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions wren-ai-service/eval/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,15 @@ async def _flat(self, prediction: dict, actual: str) -> dict:
return prediction

async def _process(self, prediction: dict, document: list, **_) -> dict:
documents = [Document.from_dict(doc) for doc in document]
documents = [Document.from_dict(doc).content for doc in document]
actual_output = await self._generation.run(
query=prediction["input"],
contexts=documents,
exclude=[],
)

prediction["actual_output"] = actual_output
prediction["retrieval_context"] = extract_units(
[doc.to_dict() for doc in documents]
)
prediction["retrieval_context"] = extract_units(documents)

return prediction

Expand Down

0 comments on commit 08297f9

Please sign in to comment.