Spaces:
Sleeping
Sleeping
Commit ·
89cb1de
1
Parent(s): 7d1e393
Fixing model calling in graph.py
Browse files
graph.py
CHANGED
|
@@ -35,7 +35,7 @@ def call_model(state: AgentState) -> AgentState:
|
|
| 35 |
"""
|
| 36 |
try:
|
| 37 |
# Access the model from the global context
|
| 38 |
-
model =
|
| 39 |
messages = state.messages
|
| 40 |
response = model.invoke(messages)
|
| 41 |
return {"messages": [response]}
|
|
|
|
| 35 |
"""
|
| 36 |
try:
|
| 37 |
# Access the model from the global context
|
| 38 |
+
model = call_model.__globals__["_model"]
|
| 39 |
messages = state.messages
|
| 40 |
response = model.invoke(messages)
|
| 41 |
return {"messages": [response]}
|