Str Evaluator Mapper (#12401)

pull/12403/head^2
William FH 9 months ago committed by GitHub
parent fcad1d2965
commit 4254028c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save