Documentation Index Fetch the complete documentation index at: https://mintlify.com/Kr-Yogsa/ECE-BOT/llms.txt
Use this file to discover all available pages before exploring further.
ECE-BOT persists every conversation as a named session tied to a specific hardware assistant. Use GET /chat/sessions to load the session list for a sidebar or history view, and GET /chat/session/{session_id} to replay a full conversation including each message’s AI source and confidence score.
Both endpoints require a valid Bearer token. Sessions are strictly scoped to the authenticated user — one user cannot access another user’s sessions.
GET /chat/sessions
Returns all chat sessions belonging to the authenticated user, ordered for display in the sidebar.
Bearer token obtained at login. Format: Bearer <token>.
Response
All sessions for the authenticated user. Returns an empty array if no sessions exist. Unique session identifier. Pass this as session_id when sending follow-up messages or retrieving history.
The hardware assistant associated with this session (e.g., "cnc", "melfa", "plc").
Auto-generated title derived from the first user message (maximum 40 characters).
ISO 8601 timestamp of when the session was created.
Example
curl --request GET \
--url https://your-ece-bot-host/chat/sessions \
--header 'Authorization: Bearer <token>'
{
"sessions" : [
{
"id" : 1 ,
"hardware_id" : "cnc" ,
"title" : "CNC Error Code" ,
"created_at" : "2026-05-07T08:32:11Z"
},
{
"id" : 2 ,
"hardware_id" : "melfa" ,
"title" : "MELFA Servo Alarm" ,
"created_at" : "2026-05-07T09:14:05Z"
}
]
}
GET /chat/session/
Returns the session metadata and the full ordered message history for a single session.
Bearer token obtained at login. Format: Bearer <token>.
Path parameters
The numeric ID of the session to retrieve. Obtained from the id field in GET /chat/sessions or the session_id field in a POST /chat response.
Response
Metadata for the requested session. Unique session identifier.
Hardware assistant used in this session.
Auto-generated session title.
ISO 8601 timestamp of session creation.
All messages in chronological order. Either "user" (message sent by the authenticated user) or "assistant" (reply generated by ECE-BOT).
The text content of the message.
Present only on assistant messages. Indicates which AI backend produced the reply:
"intent_model" — the hardware-specific intent classifier answered with confidence above the threshold.
"LLM" — Gemini was used as a fallback because intent confidence was too low.
Present only on assistant messages. Float in the range 0.0–1.0 representing the intent model’s confidence score. Values below 0.75 cause the LLM fallback to be used.
ISO 8601 timestamp of when the message was stored.
Errors
Status Condition 401Missing or invalid Bearer token. 404Session does not exist or belongs to a different user.
Example
curl --request GET \
--url https://your-ece-bot-host/chat/session/1 \
--header 'Authorization: Bearer <token>'
{
"session" : {
"id" : 1 ,
"hardware_id" : "cnc" ,
"title" : "CNC Error Code" ,
"created_at" : "2026-05-07T08:32:11Z"
},
"messages" : [
{
"role" : "user" ,
"content" : "What is error E100?" ,
"created_at" : "2026-05-07T08:32:11Z"
},
{
"role" : "assistant" ,
"content" : "Error E100 means the spindle motor overloaded. Check the spindle load meter and reduce the cutting depth." ,
"source" : "intent_model" ,
"confidence" : 0.92 ,
"created_at" : "2026-05-07T08:32:12Z"
}
]
}
{
"error" : "Chat session not found."
}
Requesting a session that belongs to another user returns 404, not 403. ECE-BOT does not reveal whether a session exists for a different user.