Schemas
Schemas used within langgraph_graphs.
Note: These schemas may need to conform to Protocols imposed by backend services.
Generally shouldn't be depended upon in backend (backend should prefer Protocols).
FullBasicGraphState
Bases: FullGraphState
FullGraphState
Bases: BaseModel
General FullGraphState that graphs should inherit from.
This is the general state that e.g. the backend can handle saving and loading between runs.
Note: Graphs using this don't have to use all the fields.
current_context = []
class-attribute
instance-attribute
current_response_messages = []
class-attribute
instance-attribute
debug_info = []
class-attribute
instance-attribute
in_subgraph = False
class-attribute
instance-attribute
is_last_step = False
class-attribute
instance-attribute
last_completed_step = None
class-attribute
instance-attribute
main_llm_call_count = 0
class-attribute
instance-attribute
previous_messages = []
class-attribute
instance-attribute
prompt = None
class-attribute
instance-attribute
prompt_components_trimmed = []
class-attribute
instance-attribute
remaining_steps = -1
class-attribute
instance-attribute
required_steps = None
class-attribute
instance-attribute
returning_incomplete = True
class-attribute
instance-attribute
sub_assistant_state_datas = {}
class-attribute
instance-attribute
summary_of_conversation = None
class-attribute
instance-attribute
user_input
instance-attribute
GraphNodeNames
Bases: StrEnum
CALL_LLM = 'call_llm'
class-attribute
instance-attribute
CALL_SUB_ASSISTANT = 'call_sub_assistant'
class-attribute
instance-attribute
CALL_TOOL = 'call_tool'
class-attribute
instance-attribute
COLLECT_INITIAL_DATA = 'collect_initial_data'
class-attribute
instance-attribute
GENERATE_PROMPT = 'generate_prompt'
class-attribute
instance-attribute
combine_last_steps(left, right)
If multiple steps are merging, combine their values.
dict_combine(left, right)
Combine two dictionaries, with right taking precedence over left.