GoogleCloudPlatform / genai-databases-retrieval-app

Apache License 2.0
212 stars 72 forks source link

Missing date in booking departure timestamp throws error #333

Open AndrewBrook-Google opened 7 months ago

AndrewBrook-Google commented 7 months ago

if someone says "book WN 158 at 8:30" and omits the date, we should probably ask them to confirm which day.

Currently booking tool is invoked like this:

2024-04-07 17:35:04.717 PDT { 2024-04-07 17:35:04.717 PDT "action": "Insert Ticket", 2024-04-07 17:35:04.717 PDT "action_input": { 2024-04-07 17:35:04.717 PDT "airline": "WN", 2024-04-07 17:35:04.717 PDT "flight_number": "158", 2024-04-07 17:35:04.717 PDT "departure_airport": "SFO", 2024-04-07 17:35:04.717 PDT "arrival_airport": "LAS", 2024-04-07 17:35:04.717 PDT "departure_time": "08:36:00", 2024-04-07 17:35:04.717 PDT "arrival_time": "10:00:00", 2024-04-07 17:35:04.717 PDT "seat_row": "8", 2024-04-07 17:35:04.717 PDT "seat_letter": "A" 2024-04-07 17:35:04.717 PDT } 2024-04-07 17:35:04.717 PDT }

Which throws some errors: {"detail":"Error invoking agent: 4 validation errors for TicketInput\ndeparture_time\n invalid datetime format (type=value_error.datetime)\ndeparture_time\n invalid date format (type=value_error.date)\narrival_time\n invalid datetime format (type=value_error.datetime)\narrival_time\n invalid date format (type=value_error.date)"}