Str Evaluator Mapper (#12401)

This commit is contained in:
William FH
2023-10-27 13:38:47 +09:00
committed by GitHub
parent fcad1d2965
commit 4254028c52

View File

@@ -226,7 +226,7 @@ class StringExampleMapper(Serializable):
return {
"reference": self.serialize_chat_messages([output])
if isinstance(output, dict) and output.get("type") and output.get("data")
else str(output)
else output
}
def __call__(self, example: Example) -> Dict[str, str]: