modifier.py — langchain Source File
Architecture documentation for modifier.py, a python file in the langchain codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 74d74c24_89bd_b542_fd83_4bf8728305c5["modifier.py"] 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] 74d74c24_89bd_b542_fd83_4bf8728305c5 --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 a1369c93_b21f_2edb_d15c_ec3e09ac1e42["langchain_core.messages.base"] 74d74c24_89bd_b542_fd83_4bf8728305c5 --> a1369c93_b21f_2edb_d15c_ec3e09ac1e42 style 74d74c24_89bd_b542_fd83_4bf8728305c5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Message responsible for deleting other messages."""
from typing import Any, Literal
from langchain_core.messages.base import BaseMessage
class RemoveMessage(BaseMessage):
"""Message responsible for deleting other messages."""
type: Literal["remove"] = "remove"
"""The type of the message (used for serialization)."""
def __init__(
self,
id: str,
**kwargs: Any,
) -> None:
"""Create a RemoveMessage.
Args:
id: The ID of the message to remove.
**kwargs: Additional fields to pass to the message.
Raises:
ValueError: If the 'content' field is passed in kwargs.
"""
if kwargs.pop("content", None):
msg = "RemoveMessage does not support 'content' field."
raise ValueError(msg)
super().__init__("", id=id, **kwargs)
Domain
Subdomains
Classes
Dependencies
- langchain_core.messages.base
- typing
Source
Frequently Asked Questions
What does modifier.py do?
modifier.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, MessageSchema subdomain.
What does modifier.py depend on?
modifier.py imports 2 module(s): langchain_core.messages.base, typing.
Where is modifier.py in the architecture?
modifier.py is located at libs/core/langchain_core/messages/modifier.py (domain: CoreAbstractions, subdomain: MessageSchema, directory: libs/core/langchain_core/messages).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free