langchain/libs/core/langchain_core/load
Vadym Barda e8d77002ea
core: add RemoveMessage (#23636)
This change adds a new message type `RemoveMessage`. This will enable
`langgraph` users to manually modify graph state (or have the graph
nodes modify the state) to remove messages by `id`

Examples:

* allow users to delete messages from state by calling

```python
graph.update_state(config, values=[RemoveMessage(id=state.values[-1].id)])
```

* allow nodes to delete messages

```python
graph.add_node("delete_messages", lambda state: [RemoveMessage(id=state[-1].id)])
```
2024-06-28 14:40:02 -07:00
..
__init__.py docs: modules descriptions (#17844) 2024-02-21 15:58:21 -08:00
dump.py Fix return value type of dumpd (#20123) 2024-06-20 16:31:41 +00:00
load.py anthropic[patch]: serialization in partner package (#18828) 2024-04-16 16:05:58 -07:00
mapping.py core: add RemoveMessage (#23636) 2024-06-28 14:40:02 -07:00
serializable.py core[patch]: Add documentation to load namespace (#23143) 2024-06-19 15:21:41 +00:00