mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
merged old agent goal in with keynote goal
This commit is contained in:
@@ -37,10 +37,14 @@ def search_airport(query: str) -> list:
|
||||
try:
|
||||
return json.loads(data).get("data", [])
|
||||
except json.JSONDecodeError:
|
||||
print("Error: Failed to decode JSON response")
|
||||
print(f"Response: {data.decode('utf-8')}")
|
||||
return []
|
||||
|
||||
|
||||
def search_flights(args: dict) -> dict: # _realapi
|
||||
def search_flights_real_api(
|
||||
args: dict,
|
||||
) -> dict: # rename to search_flights to use the real API
|
||||
"""
|
||||
1) Looks up airport/city codes via search_airport.
|
||||
2) Finds the first matching skyId/entityId for both origin & destination.
|
||||
@@ -169,7 +173,7 @@ def search_flights(args: dict) -> dict: # _realapi
|
||||
}
|
||||
|
||||
|
||||
def search_flights_example(args: dict) -> dict:
|
||||
def search_flights(args: dict) -> dict:
|
||||
"""
|
||||
Returns example flight search results in the requested JSON format.
|
||||
"""
|
||||
@@ -195,5 +199,19 @@ def search_flights_example(args: dict) -> dict:
|
||||
"return_flight_code": "NZ527",
|
||||
"return_operating_carrier": "Air New Zealand",
|
||||
},
|
||||
{
|
||||
"operating_carrier": "United Airlines",
|
||||
"outbound_flight_code": "UA100",
|
||||
"price": 1500.00,
|
||||
"return_flight_code": "UA101",
|
||||
"return_operating_carrier": "United Airlines",
|
||||
},
|
||||
{
|
||||
"operating_carrier": "Delta Airlines",
|
||||
"outbound_flight_code": "DL200",
|
||||
"price": 1600.00,
|
||||
"return_flight_code": "DL201",
|
||||
"return_operating_carrier": "Delta Airlines",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user