haive.core.graph.branches.utils¶
Utility functions for working with branches.
Functions¶
|
Extract the base field from a path. |
|
Extract a field value from state using a path. |
Extract field references from a function. |
|
|
Get a field value using various access methods. |
Module Contents¶
- haive.core.graph.branches.utils.extract_base_field(field_path)[source]¶
Extract the base field from a path.
- haive.core.graph.branches.utils.extract_field(state, field_path)[source]¶
Extract a field value from state using a path.
Supports: - Simple keys: “fieldname” - Nested paths: “nested.field.path” - Array indexing: “array.0.field” - Special paths: “messages.last.content”
- Parameters:
state (Any) – State object
field_path (str) – Path to the field
- Returns:
Extracted value or None if not found
- Return type:
Any