Appearance
AI Chat
lms.ai_chat
Fields
Every record also has id, created_at and updated_at.
| Field | Label | Type | Rules |
|---|---|---|---|
user | user | link → core.user | required |
assistant | assistant | select | required; one of: AI Tutor, Study Mate, Topic Planner, General |
title | title | text | max 255 characters |
tutor_topic | tutor topic | link → lms.ai_tutor_topic | |
language | language | text | max 50 characters |
messages | messages | json | |
message_count | message count | number | default 0; min 0 |
last_message_at | last message at | datetime | |
is_archived | is archived | check | default false |
Permissions
| Role | Can |
|---|---|
lms:admin | read |
lms:student | read, create, update, delete — only own rows (via user) |
lms:faculty | read, create, update, delete — only own rows (via user) |
API
http
GET /api/lms/ai_chat?<field>=<value>&limit=100&offset=0
POST /api/lms/ai_chat
GET /api/lms/ai_chat/:id
PATCH /api/lms/ai_chat/:id
DELETE /api/lms/ai_chat/:id