Home / Function/ close() — langchain Function Reference

close() — langchain Function Reference

Architecture documentation for the close() function in xml.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  6ac405fd_5160_74ca_d2a3_72428bbea335["close()"]
  7c8ef0f6_8408_1c9b_5ed7_f17f7f527cbc["_StreamingParser"]
  6ac405fd_5160_74ca_d2a3_72428bbea335 -->|defined in| 7c8ef0f6_8408_1c9b_5ed7_f17f7f527cbc
  6ac405fd_5160_74ca_d2a3_72428bbea335["close()"]
  6ac405fd_5160_74ca_d2a3_72428bbea335 -->|calls| 6ac405fd_5160_74ca_d2a3_72428bbea335
  f2d3a631_3745_7a99_7dfc_8664b6a06b99["_transform()"]
  f2d3a631_3745_7a99_7dfc_8664b6a06b99 -->|calls| 6ac405fd_5160_74ca_d2a3_72428bbea335
  32340f36_d7fb_913d_0253_43b61c3f0b73["_atransform()"]
  32340f36_d7fb_913d_0253_43b61c3f0b73 -->|calls| 6ac405fd_5160_74ca_d2a3_72428bbea335
  6ac405fd_5160_74ca_d2a3_72428bbea335["close()"]
  6ac405fd_5160_74ca_d2a3_72428bbea335 -->|calls| 6ac405fd_5160_74ca_d2a3_72428bbea335
  style 6ac405fd_5160_74ca_d2a3_72428bbea335 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/output_parsers/xml.py lines 141–148

    def close(self) -> None:
        """Close the parser.

        This should be called after all chunks have been parsed.
        """
        # Ignore ParseError. This will ignore any incomplete XML at the end of the input
        with contextlib.suppress(xml.etree.ElementTree.ParseError):
            self.pull_parser.close()

Domain

Subdomains

Calls

Frequently Asked Questions

What does close() do?
close() is a function in the langchain codebase, defined in libs/core/langchain_core/output_parsers/xml.py.
Where is close() defined?
close() is defined in libs/core/langchain_core/output_parsers/xml.py at line 141.
What does close() call?
close() calls 1 function(s): close.
What calls close()?
close() is called by 3 function(s): _atransform, _transform, close.

Analyze Your Own Codebase

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

Try Supermodel Free