Update agent.py
Browse files
agent.py
CHANGED
|
@@ -89,25 +89,6 @@ def build_graph():
|
|
| 89 |
# Compile graph
|
| 90 |
return builder.compile()
|
| 91 |
|
| 92 |
-
# --- Testing the tools ---
|
| 93 |
-
|
| 94 |
-
# Test case: Basic Wikipedia search
|
| 95 |
-
print("--- Test Case 1: Basic Search ---")
|
| 96 |
-
query1 = "Principle of double effect"
|
| 97 |
-
result1 = search_wiki.invoke(query1)
|
| 98 |
-
print(f"Query: '{query1}'")
|
| 99 |
-
print(f"Result Type: {type(result1)}")
|
| 100 |
-
print(f"Result (first 500 chars): {result1[:500]}...")
|
| 101 |
-
print("\n")
|
| 102 |
-
|
| 103 |
-
# Test case: Basic web search
|
| 104 |
-
print("--- Test Case 1: Basic Search ---")
|
| 105 |
-
query1 = "Principle of double effect"
|
| 106 |
-
result1 = tavily_search_tool.invoke(query1)
|
| 107 |
-
print(f"Query: '{query1}'")
|
| 108 |
-
print(f"Result Type: {type(result1)}")
|
| 109 |
-
print(f"Result (first 500 chars): {result1[:500]}...")
|
| 110 |
-
print("\n")
|
| 111 |
|
| 112 |
# test agent
|
| 113 |
if __name__ == "__main__":
|
|
|
|
| 89 |
# Compile graph
|
| 90 |
return builder.compile()
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
# test agent
|
| 94 |
if __name__ == "__main__":
|