langgraph_agent_toolkit.agents.blueprints.interrupt_agent.agent module
- class langgraph_agent_toolkit.agents.blueprints.interrupt_agent.agent.AgentState[source][source]
Bases:
MessagesStateState that permits optional keys.
- birthdate: datetime | None
- messages: _add_messages at 0x7f1491b2efc0>]
- langgraph_agent_toolkit.agents.blueprints.interrupt_agent.agent.wrap_model(model, system_prompt)[source][source]
- Parameters:
model (BaseChatModel | Runnable[PromptValue | str | Sequence[BaseMessage | list[str] | tuple[str, str | list[str | dict[str, Any]]] | str | dict[str, Any]], Any])
system_prompt (BaseMessage)
- Return type:
RunnableSerializable[Any, BaseMessage]
- async langgraph_agent_toolkit.agents.blueprints.interrupt_agent.agent.background(state, config)[source][source]
Run a model call before the interrupt.
- Parameters:
state (AgentState)
config (RunnableConfig)
- Return type:
- class langgraph_agent_toolkit.agents.blueprints.interrupt_agent.agent.BirthdateExtraction(*, birthdate, reasoning)[source][source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
birthdate (str | None)
reasoning (str)
- birthdate: str | None
- reasoning: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async langgraph_agent_toolkit.agents.blueprints.interrupt_agent.agent.determine_birthdate(state, config)[source][source]
Find the user’s birthdate in the conversation history.
Interrupt when no birthdate is found.
- Parameters:
state (AgentState)
config (RunnableConfig)
- Return type:
- async langgraph_agent_toolkit.agents.blueprints.interrupt_agent.agent.determine_sign(state, config)[source][source]
Determine the user’s zodiac sign from their birthdate.
- Parameters:
state (AgentState)
config (RunnableConfig)
- Return type: