Scott Cogan
commited on
Commit
·
2defd9c
1
Parent(s):
fd5ac7f
debug
Browse files
app.py
CHANGED
|
@@ -20,11 +20,15 @@ import time
|
|
| 20 |
from tenacity import retry, stop_after_attempt, wait_exponential
|
| 21 |
import json
|
| 22 |
import logging
|
|
|
|
| 23 |
|
| 24 |
# Set up logging
|
| 25 |
logging.basicConfig(level=logging.INFO)
|
| 26 |
logger = logging.getLogger(__name__)
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
# Constants
|
| 29 |
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
| 30 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
@@ -194,7 +198,7 @@ class BasicAgent:
|
|
| 194 |
- Never make up information - if you can't find it, say so''')
|
| 195 |
|
| 196 |
# Create the graph
|
| 197 |
-
self.workflow = StateGraph(AgentState
|
| 198 |
|
| 199 |
# Add nodes
|
| 200 |
self.workflow.add_node("agent", self.call_model)
|
|
|
|
| 20 |
from tenacity import retry, stop_after_attempt, wait_exponential
|
| 21 |
import json
|
| 22 |
import logging
|
| 23 |
+
from langgraph import config
|
| 24 |
|
| 25 |
# Set up logging
|
| 26 |
logging.basicConfig(level=logging.INFO)
|
| 27 |
logger = logging.getLogger(__name__)
|
| 28 |
|
| 29 |
+
# Set global recursion limit
|
| 30 |
+
config.set_recursion_limit(50)
|
| 31 |
+
|
| 32 |
# Constants
|
| 33 |
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
| 34 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 198 |
- Never make up information - if you can't find it, say so''')
|
| 199 |
|
| 200 |
# Create the graph
|
| 201 |
+
self.workflow = StateGraph(AgentState)
|
| 202 |
|
| 203 |
# Add nodes
|
| 204 |
self.workflow.add_node("agent", self.call_model)
|