Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,7 +74,7 @@ rate_limiter = InMemoryRateLimiter(
|
|
| 74 |
)
|
| 75 |
|
| 76 |
chat = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0, rate_limiter=rate_limiter)
|
| 77 |
-
|
| 78 |
multiply,
|
| 79 |
add,
|
| 80 |
subtract,
|
|
@@ -103,7 +103,7 @@ class BasicAgent:
|
|
| 103 |
def __init__(self):
|
| 104 |
graph = StateGraph(MessagesState)
|
| 105 |
graph.add_node("assistant", assistant)
|
| 106 |
-
graph.add_node("tools", ToolNode(
|
| 107 |
graph.add_edge(START, "assistant")
|
| 108 |
graph.add_conditional_edges("assistant", tools_condition)
|
| 109 |
graph.add_edge("tools", "assistant")
|
|
|
|
| 74 |
)
|
| 75 |
|
| 76 |
chat = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0, rate_limiter=rate_limiter)
|
| 77 |
+
tools_list = [
|
| 78 |
multiply,
|
| 79 |
add,
|
| 80 |
subtract,
|
|
|
|
| 103 |
def __init__(self):
|
| 104 |
graph = StateGraph(MessagesState)
|
| 105 |
graph.add_node("assistant", assistant)
|
| 106 |
+
graph.add_node("tools", ToolNode(tools_list))
|
| 107 |
graph.add_edge(START, "assistant")
|
| 108 |
graph.add_conditional_edges("assistant", tools_condition)
|
| 109 |
graph.add_edge("tools", "assistant")
|