The Chatbot API exposes a single public endpoint that accepts a natural-language message and returns a response generated by Llama 3.3 70B running on Groq. On each request the server queries the database for all currently available (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lffiesco-svg/gastromovil/llms.txt
Use this file to discover all available pages before exploring further.
disponible=True) products and injects them as context into the system prompt, so the model always reasons over live menu data. An optional conversation history lets the model maintain context across multiple turns. The endpoint requires no authentication — it is accessible to any visitor.
The server requires the
GROQ_API_KEY environment variable to be set. If the variable is missing or invalid, the LLM call will fail and the endpoint returns the error string "Error al procesar tu consulta. Intenta de nuevo mas tarde." with a 200 OK status.Send a Chatbot Message
POST /api/chatbot/
Request Body
The user’s message or question (max 500 characters). Natural language questions about the menu, prices, ingredients, or availability are all valid. Special trigger words (see Surprise Mode below) activate a different response format.
Optional conversation history to maintain multi-turn context. Each element is an object with
role ("user" or "assistant") and content (the message text). The server uses only the last 6 entries to stay within Groq token limits — pass a rolling window from your client.Optional category name filter. When provided, only products whose
categoria__nombre matches this string (case-insensitive) are included in the LLM context. Useful for narrowing recommendations to a specific menu section.Optional restaurant name filter. When provided, only products from the matching restaurant are injected into the LLM context.
Normal Response
For most messages the endpoint returns a plain text LLM response.200 OK
The chatbot’s natural-language answer based on the live product data and the provided conversation history.
Surprise Mode
When themensaje field contains any of the following trigger words (checked case-insensitively), the server bypasses the normal LLM flow, selects a random available product, asks the model for a short appetising reason to order it, and returns a structured JSON payload embedded inside the respuesta string.
Trigger words: sorpréndeme, sorprendeme, recomiéndame, recomiendame, sorpresa
Example Request
Surprise Response
200 OK — respuesta is a JSON string. Parse it to extract the product card data.
A JSON-encoded string containing the surprise product details. Deserialize this string to read the individual fields below.
Error Response
If the Groq API call fails for any reason (network error, invalid key, rate limit), the endpoint still returns200 OK with the following body instead of propagating an exception.
Multi-turn Conversation Example
The following example shows how to maintain a conversation across two turns. Pass the previous exchange back inhistorial on the second request; the server caps to the last 6 messages before sending to Groq.
Environment Variable
The chatbot requires exactly one environment variable to be configured on the server:| Variable | Description |
|---|---|
GROQ_API_KEY | API key issued by console.groq.com. Required for all LLM calls. |