__init__() — langchain Function Reference
Architecture documentation for the __init__() function in anthropic_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD ee1b9bc4_09a3_4db9_0946_483185672423["__init__()"] 5a684c77_7feb_d0c0_3339_c0fe287f1efd["FilesystemClaudeTextEditorMiddleware"] ee1b9bc4_09a3_4db9_0946_483185672423 -->|defined in| 5a684c77_7feb_d0c0_3339_c0fe287f1efd style ee1b9bc4_09a3_4db9_0946_483185672423 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/langchain_anthropic/middleware/anthropic_tools.py lines 1083–1107
def __init__(
self,
*,
root_path: str,
allowed_prefixes: list[str] | None = None,
max_file_size_mb: int = 10,
) -> None:
"""Initialize the text editor middleware.
Args:
root_path: Root directory for file operations.
allowed_prefixes: Optional list of allowed virtual path prefixes.
Defaults to `['/']`.
max_file_size_mb: Maximum file size in MB
Defaults to `10`.
"""
super().__init__(
tool_type=TEXT_EDITOR_TOOL_TYPE,
tool_name=TEXT_EDITOR_TOOL_NAME,
root_path=root_path,
allowed_prefixes=allowed_prefixes,
max_file_size_mb=max_file_size_mb,
)
Domain
Subdomains
Source
Frequently Asked Questions
What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/middleware/anthropic_tools.py.
Where is __init__() defined?
__init__() is defined in libs/partners/anthropic/langchain_anthropic/middleware/anthropic_tools.py at line 1083.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free