Vacation Planner
An API that turns season, interests, and budget into an itinerary. A background generation job lets the client submit a request, then fetch the result by ID.
Set a direction
Travel preferences enter the API, which returns a job ID.
Illustration of the project workflow.
- Set a direction
Travel preferences enter the API, which returns a job ID.
- Work in the background
A goroutine handles the model request through LangChainGo.
- Collect the itinerary
The client polls by ID. Results currently remain in memory.
On the workbenchPoll a sample job
The client polls a job by ID. A successful provider response sets completed to true. A provider error leaves the stored completion flag false. Read the source
The problem
LLM generation takes time. The API needs to accept a planning request without holding the client connection open for the entire response.
The approach
Gin returns a job ID, a goroutine runs the LangChainGo request, and a second endpoint exposes completion status and the itinerary.
The result
A working asynchronous API experiment. Job results are stored in memory, so they do not survive a server restart.