AI & intelligence
OpenAI integration
How does AonHive use OpenAI?
OpenAI integration for evaluated product capabilities and automation.
On TripGlide the assistant runs in an edge function. The function calls OpenAI with the signed-in user's token. The trip id is fixed for that request. The model can load that trip or the weather for a place and a date. The key stays in the function. The default model is gpt-4o-mini.Discuss this stackHow we use it
The model sees only the trip it was given.
- 01
Bind the id before the tool runs
The function rejects an id that is not a UUID. get_trip_data cannot supply a different one. Email and contact are dropped unless the caller is an owner or an admin.
- 02
Require a tool for a fact
Bookings, prices, and hours have to come from a tool. Weather comes from Open-Meteo for that place and date. A blank in the prompt is not a license to invent them.
- 03
End the loop
After the tool turns, the function calls the model once more with the tools removed. The answer has to finish. The call does not book anything.
OpenAI
Bring the system this has to fit.
Tell us the product, the estate you already run, and what your team needs to own. We will say whether this belongs in the stack.