__init__() — langchain Function Reference
Architecture documentation for the __init__() function in html.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 884c7870_4829_e49a_c22a_6f89bea245e3["__init__()"] 0c8a5f97_7cb0_fe24_746d_9689c4e5426c["HTMLSectionSplitter"] 884c7870_4829_e49a_c22a_6f89bea245e3 -->|defined in| 0c8a5f97_7cb0_fe24_746d_9689c4e5426c style 884c7870_4829_e49a_c22a_6f89bea245e3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/text-splitters/langchain_text_splitters/html.py lines 354–374
def __init__(
self,
headers_to_split_on: list[tuple[str, str]],
**kwargs: Any,
) -> None:
"""Create a new `HTMLSectionSplitter`.
Args:
headers_to_split_on: List of tuples of headers we want to track mapped to
(arbitrary) keys for metadata.
Allowed header values: `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, e.g.:
`[("h1", "Header 1"), ("h2", "Header 2"]`.
**kwargs: Additional optional arguments for customizations.
"""
self.headers_to_split_on = dict(headers_to_split_on)
self.xslt_path = (
pathlib.Path(__file__).parent / "xsl/converting_to_header.xslt"
).absolute()
self.kwargs = kwargs
Domain
Subdomains
Source
Frequently Asked Questions
What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/text-splitters/langchain_text_splitters/html.py.
Where is __init__() defined?
__init__() is defined in libs/text-splitters/langchain_text_splitters/html.py at line 354.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free