Skip to content

Commit 1c1bb28

Browse files
Add default value for tools
Signed-off-by: Luis Valdes <[email protected]>
1 parent c5bcd65 commit 1c1bb28

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

typescript-sdk/integrations/langgraph/examples/python/agents/agentic_chat/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AgentState(MessagesState):
1717
"""
1818
State of our graph.
1919
"""
20-
tools: List[Any]
20+
tools: List[Any] = []
2121

2222
async def chat_node(state: AgentState, config: Optional[RunnableConfig] = None):
2323
"""

typescript-sdk/integrations/langgraph/examples/python/agents/agentic_chat_reasoning/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AgentState(MessagesState):
1919
"""
2020
State of our graph.
2121
"""
22-
tools: List[Any]
22+
tools: List[Any] = []
2323
model: str
2424

2525
async def chat_node(state: AgentState, config: Optional[RunnableConfig] = None):

typescript-sdk/integrations/langgraph/examples/python/agents/agentic_generative_ui/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class AgentState(MessagesState):
4646
State of the agent.
4747
"""
4848
steps: List[dict] = []
49-
tools: List[Any]
49+
tools: List[Any] = []
5050

5151

5252
async def start_node(state: AgentState, config: RunnableConfig): # pylint: disable=unused-argument

typescript-sdk/integrations/langgraph/examples/python/agents/human_in_the_loop/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class AgentState(MessagesState):
3939
State of the agent.
4040
"""
4141
steps: List[Dict[str, str]] = []
42-
tools: List[Any]
42+
tools: List[Any] = []
4343

4444
async def start_node(state: Dict[str, Any], config: RunnableConfig): # pylint: disable=unused-argument
4545
"""

typescript-sdk/integrations/langgraph/examples/python/agents/predictive_state_updates/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AgentState(MessagesState):
3434
The state of the agent.
3535
"""
3636
document: Optional[str] = None
37-
tools: List[Any]
37+
tools: List[Any] = []
3838

3939

4040
async def start_node(state: AgentState, config: RunnableConfig): # pylint: disable=unused-argument

typescript-sdk/integrations/langgraph/examples/python/agents/shared_state/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class AgentState(MessagesState):
9999
The state of the recipe.
100100
"""
101101
recipe: Optional[Dict[str, Any]] = None
102-
tools: List[Any]
102+
tools: List[Any] = []
103103

104104

105105
async def start_node(state: Dict[str, Any], config: RunnableConfig):

typescript-sdk/integrations/langgraph/examples/python/agents/subgraphs/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class TravelAgentState(MessagesState):
7373
itinerary: Annotated[dict, merge_itinerary] = None
7474

7575
# Tools available to all agents
76-
tools: List[Any] = None
76+
tools: List[Any] = []
7777

7878
# Supervisor routing
7979
next_agent: Optional[str] = None

typescript-sdk/integrations/langgraph/examples/python/agents/tool_based_generative_ui/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class AgentState(MessagesState):
1818
"""
1919
State of the agent.
2020
"""
21-
tools: List[Any]
21+
tools: List[Any] = []
2222

2323
async def chat_node(state: AgentState, config: RunnableConfig) -> Command[Literal["tool_node", "__end__"]]:
2424
"""

0 commit comments

Comments
 (0)