mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-07 12:06:43 +00:00
Str Evaluator Mapper (#12401)
This commit is contained in:
parent
fcad1d2965
commit
4254028c52
@ -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…
Reference in New Issue
Block a user