StringExampleMapper#
- class langchain.smith.evaluation.string_run_evaluator.StringExampleMapper[source]#
Bases:
Serializable
Map an example, or row in the dataset, to the inputs of an evaluation.
- param reference_key: str | None = None#
- __call__(
- example: Example,
Maps the Run and Example to a dictionary.
- Parameters:
example (Example)
- Return type:
dict[str, str]
- map(
- example: Example,
Maps the Example, or dataset row to a dictionary.
- Parameters:
example (Example)
- Return type:
dict[str, str]
- serialize_chat_messages(
- messages: list[dict],
Extract the input messages from the run.
- Parameters:
messages (list[dict])
- Return type:
str
- property output_keys: list[str]#
The keys to extract from the run.