Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ from langgraph.prebuilt import ToolNode
|
|
11 |
from tools import simple_search
|
12 |
from huggingface_hub import InferenceClient
|
13 |
from typing_extensions import TypedDict
|
|
|
14 |
|
15 |
def override(_, new): return new
|
16 |
|
@@ -140,6 +141,8 @@ Do not include any other text or explanation. Only return the dictionary.
|
|
140 |
|
141 |
def _use_search(self, state: AgentState) -> AgentState:
|
142 |
"""Use the search tool."""
|
|
|
|
|
143 |
try:
|
144 |
print("\n=== Search Tool ===")
|
145 |
print(f"Search Query: {state['search_query']}")
|
|
|
11 |
from tools import simple_search
|
12 |
from huggingface_hub import InferenceClient
|
13 |
from typing_extensions import TypedDict
|
14 |
+
import time
|
15 |
|
16 |
def override(_, new): return new
|
17 |
|
|
|
141 |
|
142 |
def _use_search(self, state: AgentState) -> AgentState:
|
143 |
"""Use the search tool."""
|
144 |
+
time.sleep(2) # Sleep before search
|
145 |
+
|
146 |
try:
|
147 |
print("\n=== Search Tool ===")
|
148 |
print(f"Search Query: {state['search_query']}")
|