FinishedOutputParser Class — langchain Architecture
Architecture documentation for the FinishedOutputParser class in prompts.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 96b6055b_5824_f580_a75e_2ff927edc582["FinishedOutputParser"] c4578981_52fe_d7f9_385b_bf23d656ec0b["prompts.py"] 96b6055b_5824_f580_a75e_2ff927edc582 -->|defined in| c4578981_52fe_d7f9_385b_bf23d656ec0b b56c7926_c7a8_ee7d_f660_7d8110d13ec8["parse()"] 96b6055b_5824_f580_a75e_2ff927edc582 -->|method| b56c7926_c7a8_ee7d_f660_7d8110d13ec8
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/flare/prompts.py lines 6–16
class FinishedOutputParser(BaseOutputParser[tuple[str, bool]]):
"""Output parser that checks if the output is finished."""
finished_value: str = "FINISHED"
"""Value that indicates the output is finished."""
@override
def parse(self, text: str) -> tuple[str, bool]:
cleaned = text.strip()
finished = self.finished_value in cleaned
return cleaned.replace(self.finished_value, ""), finished
Source
Frequently Asked Questions
What is the FinishedOutputParser class?
FinishedOutputParser is a class in the langchain codebase, defined in libs/langchain/langchain_classic/chains/flare/prompts.py.
Where is FinishedOutputParser defined?
FinishedOutputParser is defined in libs/langchain/langchain_classic/chains/flare/prompts.py at line 6.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free