Home / Class/ FakeSplitIntoListParser Class — langchain Architecture

FakeSplitIntoListParser Class — langchain Architecture

Architecture documentation for the FakeSplitIntoListParser class in test_runnable.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d3f57059_baae_ce51_3306_6dcfae484ed2["FakeSplitIntoListParser"]
  26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"]
  d3f57059_baae_ce51_3306_6dcfae484ed2 -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5
  e5cda330_bd36_c6e9_38cf_de3eecb89ca8["is_lc_serializable()"]
  d3f57059_baae_ce51_3306_6dcfae484ed2 -->|method| e5cda330_bd36_c6e9_38cf_de3eecb89ca8
  016a1669_7ba0_c3c5_2bd7_395ac7071958["get_format_instructions()"]
  d3f57059_baae_ce51_3306_6dcfae484ed2 -->|method| 016a1669_7ba0_c3c5_2bd7_395ac7071958
  24452afe_27bd_6e03_e5b5_d832d6d6ba88["parse()"]
  d3f57059_baae_ce51_3306_6dcfae484ed2 -->|method| 24452afe_27bd_6e03_e5b5_d832d6d6ba88

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_runnable.py lines 3799–3817

class FakeSplitIntoListParser(BaseOutputParser[list[str]]):
    """Parse the output of an LLM call to a comma-separated list."""

    @classmethod
    def is_lc_serializable(cls) -> bool:
        """Return whether or not the class is serializable."""
        return True

    @override
    def get_format_instructions(self) -> str:
        return (
            "Your response should be a list of comma separated values, "
            "eg: `foo, bar, baz`"
        )

    @override
    def parse(self, text: str) -> list[str]:
        """Parse the output of an LLM call."""
        return text.strip().split(", ")

Frequently Asked Questions

What is the FakeSplitIntoListParser class?
FakeSplitIntoListParser is a class in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is FakeSplitIntoListParser defined?
FakeSplitIntoListParser is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 3799.

Analyze Your Own Codebase

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

Try Supermodel Free