Home / Function/ prep_inputs() — langchain Function Reference

prep_inputs() — langchain Function Reference

Architecture documentation for the prep_inputs() function in trajectory_eval_chain.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ccca4de6_6251_ea13_1af1_84bd1b80a9d4["prep_inputs()"]
  9066f65c_c5a3_1534_5336_72609f4ff02b["TrajectoryEvalChain"]
  ccca4de6_6251_ea13_1af1_84bd1b80a9d4 -->|defined in| 9066f65c_c5a3_1534_5336_72609f4ff02b
  b7b9afe5_844f_287f_0e36_8a8d8d34e0a8["_format_reference()"]
  ccca4de6_6251_ea13_1af1_84bd1b80a9d4 -->|calls| b7b9afe5_844f_287f_0e36_8a8d8d34e0a8
  style ccca4de6_6251_ea13_1af1_84bd1b80a9d4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_chain.py lines 275–278

    def prep_inputs(self, inputs: dict[str, Any] | Any) -> dict[str, str]:
        """Validate and prep inputs."""
        inputs["reference"] = self._format_reference(inputs.get("reference"))
        return super().prep_inputs(inputs)

Domain

Subdomains

Frequently Asked Questions

What does prep_inputs() do?
prep_inputs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_chain.py.
Where is prep_inputs() defined?
prep_inputs() is defined in libs/langchain/langchain_classic/evaluation/agents/trajectory_eval_chain.py at line 275.
What does prep_inputs() call?
prep_inputs() calls 1 function(s): _format_reference.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free