langgraph 0.1.8
Summary of Changes
- Added support for attaching metadata to nodes in graphs, which can be visualized in graph representations (#990)
- Fixed docstring for
astreammethod to matchstreammethod, with complete examples for different stream modes (#994) - Changed default
stream_modereference to useself.stream_modeinstead of hardcoded value (#994) - Updated minimum required version of
langchain-coreto 0.2.15
Detailed Changes
langgraph.graph.graph.NodeSpec
- Added new class to store a runnable along with optional metadata for graph nodes
langgraph.graph.graph.Graph
- Modified
add_nodemethod to accept an optionalmetadataparameter - Changed internal node storage to use
NodeSpecinstances instead of raw runnables - Updated all relevant methods to work with the new node structure
langgraph.graph.graph.CompiledGraph
- Updated
attach_nodeand related methods to handleNodeSpecinstances - Modified
get_graphto include node metadata in visualizations
langgraph.pregel.Pregel
- Updated docstring for
streammethod to referenceself.stream_modeas the default - Added comprehensive docstring for
astreammethod with examples for all stream modes ("values", "updates", "debug") - Fixed import example in docstring to use correct path for constants
langgraph.pregel.read.PregelNode
- Added support for
metadataparameter in__init__method - Metadata is now propagated to the node's configuration