LocalAI/core/http/endpoints
TLoE419 4634b87c53 feat(api): expose chat conversation CRUD endpoints (#9432)
Wire the chathistory store into the HTTP layer. New endpoints under
/api/conversations:

- GET    /api/conversations        list
- POST   /api/conversations        upsert (id in body)
- DELETE /api/conversations        delete all
- PUT    /api/conversations/bulk   replace entire set (localStorage migration)
- GET    /api/conversations/:id    fetch one
- PUT    /api/conversations/:id    upsert (id in path; path id wins over body)
- DELETE /api/conversations/:id    delete one

All endpoints scope queries to the authenticated user via getUserID(c)
- callers cannot impersonate other users by passing a user_id in the
body. The endpoints are gated behind the new chat_history feature
permission (default ON in APIFeatures), registered through the existing
RouteFeatureRegistry so the unified feature middleware picks them up
automatically.

Application.ChatHistoryStore() returns nil when DisableWebUI is set or
no persistence path is configured, in which case route registration is
skipped entirely rather than registering handlers that always 503.

Also adds the chat-history instruction entry and Swagger tag so the
endpoint surfaces in /api/instructions and /swagger.

Assisted-by: Claude:claude-opus-4-7

Signed-off-by: TLoE419 <tloemizuchizu@gmail.com>
2026-05-18 18:06:06 -07:00
..
anthropic fix: use SetFunctionCallNameString when forcing a specific tool (3 sites) (#9526) 2026-04-24 09:06:42 +02:00
elevenlabs feat(whisper): honor client cancellation via ggml abort_callback (#9710) 2026-05-08 01:44:47 +02:00
explorer feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
jina feat(whisper): honor client cancellation via ggml abort_callback (#9710) 2026-05-08 01:44:47 +02:00
localai feat(api): expose chat conversation CRUD endpoints (#9432) 2026-05-18 18:06:06 -07:00
mcp feat(branding): admin-configurable instance name, tagline, and assets (#9635) 2026-05-02 15:51:36 +02:00
ollama feat(ollama): report model capabilities + details on /api/tags and /api/show (#9766) 2026-05-12 00:16:19 +02:00
openai realtime: honor output_modalities to skip TTS in text-only mode (#9838) 2026-05-15 12:39:47 +02:00
openresponses fix: use SetFunctionCallNameString when forcing a specific tool (3 sites) (#9526) 2026-04-24 09:06:42 +02:00