This commit is contained in:
2026-04-05 00:43:23 +05:30
commit 8be37d3e92
425 changed files with 101853 additions and 0 deletions

26
negot8/test/test_tools.py Normal file
View File

@@ -0,0 +1,26 @@
import asyncio
import os
import sys
backend_path = os.path.join(os.path.dirname(__file__), '..', 'backend')
sys.path.insert(0, backend_path)
from tools.tavily_search import TavilySearchTool
from tools.upi_generator import UPIGeneratorTool
from tools.calculator import CalculatorTool
async def test():
# Tavily
tavily = TavilySearchTool()
r = await tavily.execute("best Thai restaurants Bandra Mumbai")
print(f"Tavily: {r['answer'][:100]}... ({len(r['results'])} results) ✅")
# UPI
upi = UPIGeneratorTool()
r = await upi.execute("rahul@paytm", "Rahul", 8200, "Goa trip settlement")
print(f"UPI: {r['upi_link'][:60]}... ✅")
# Calculator
calc = CalculatorTool()
r = await calc.execute("12000 * 0.55")
print(f"Calc: 12000 * 0.55 = {r['result']}")
asyncio.run(test())