Closed mann2107 closed 5 months ago
Also when I changed my model from gpt-3.5-turbo to gpt-4. I am getting the following output
{'text': {'data': {'flight_booking_time_info': [{'departure_from_origin_time': '5 pm',
'return_from_destination_time': '7 am',
'reach_at_destination_time': '',
'arrival_at_origin_time': ''}]},
'raw': 'departure_from_origin_time|return_from_destination_time|reach_at_destination_time|arrival_at_origin_time\r\n5 pm|7 am||',
'errors': [],
'validated_data': {}}}
So, with just an adition of '\r' in the raw output, the mapping of output to entity is working fine.
Comaprison Summary:
{'text': {'data': {'flight_booking_time_info': [{'departure_from_origin_time': '7 am',
'return_from_destination_time': '',
'reach_at_destination_time': '',
'arrival_at_origin_time': ''}]},
'raw': 'departure_from_origin_time|return_from_destination_time|reach_at_destination_time|arrival_at_origin_time\n5 pm|7 am|||\n',
'errors': [],
'validated_data': {}}}
{'text': {'data': {'flight_booking_time_info': [{'departure_from_origin_time': '5 pm',
'return_from_destination_time': '7 am',
'reach_at_destination_time': '',
'arrival_at_origin_time': ''}]},
'raw': 'departure_from_origin_time|return_from_destination_time|reach_at_destination_time|arrival_at_origin_time\r\n5 pm|7 am||',
'errors': [],
'validated_data': {}}}
The only differrence I can see in "raw" is an extra "\r" in the output. Thanks
I got this response after invoking a chain.
We can see in "raw" that 5 pm and 7 am are extracted. but in "data" only departure_from_origin_time is outputted.
Here is my Schema:
Here is the example I was testing:
Hello there, I hope this message finds you well. I need to book a business trip. I'll need to fly from Bengaluru on 20th Jan 2024 at around 5 pm. After the meeting, I'll be returning from LGA on the 25th of Jan 2024, around 7 am. I would require a hotel and car rental facility also at my destination place. Please confirm the booking as soon as possible. I would prefer American Airlines with Window Seat in the Outbound. Also Book me a Aisle seat in Jet Blue in the return Journey. If You can take care that the fare should not be more than $500 that would be great. Thanks!