mirror of
https://github.com/arkorty/B.Tech-Project-III.git
synced 2026-04-19 12:41:48 +00:00
init
This commit is contained in:
26
negot8/test/test_tools.py
Normal file
26
negot8/test/test_tools.py
Normal 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())
|
||||
Reference in New Issue
Block a user