mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
works a lot better with 4o!
This commit is contained in:
@@ -4,21 +4,20 @@ def search_flights(args: dict) -> dict:
|
||||
Currently just prints/returns the passed args,
|
||||
but you can add real flight search logic later.
|
||||
"""
|
||||
date_depart = args.get("dateDepart")
|
||||
date_return = args.get("dateReturn")
|
||||
# date_depart = args.get("dateDepart")
|
||||
# date_return = args.get("dateReturn")
|
||||
origin = args.get("origin")
|
||||
destination = args.get("destination")
|
||||
|
||||
print(f"Searching flights from {origin} to {destination}")
|
||||
print(f"Depart: {date_depart}, Return: {date_return}")
|
||||
|
||||
# Return a mock result so you can verify it
|
||||
return {
|
||||
"tool": "SearchFlights",
|
||||
"searchResults": [
|
||||
"QF123: $1200",
|
||||
"VA456: $1000",
|
||||
flight_search_results = {
|
||||
"origin": f"{origin}",
|
||||
"destination": f"{destination}",
|
||||
"currency": "USD",
|
||||
"results": [
|
||||
{"flight_number": "CX101", "return_flight_number": "CX102", "price": 850.0},
|
||||
{"flight_number": "QF30", "return_flight_number": "QF29", "price": 920.0},
|
||||
{"flight_number": "MH129", "return_flight_number": "MH128", "price": 780.0},
|
||||
],
|
||||
"status": "search-complete",
|
||||
"args": args,
|
||||
}
|
||||
|
||||
return flight_search_results
|
||||
|
||||
Reference in New Issue
Block a user