GET/POST /api/conversation_preferences reads/writes the flag; POST sets absolute boolean without toggling conversation_order when only this field is sent.
Chat + document RAG paths skip prior-turn history when the flag is off (AsyncLLMService, AsyncRAGService, both WS consumers).
manage.py test chat_backend.tests.test_models chat_backend.tests.test_views_conversations.ConversationPreferencesTestCase chat_backend.tests.test_services_llm chat_backend.tests.test_services_rag
New user / unset flag → use_conversation_context is false; history empty in LLM/RAG prompts
Enable via preferences API → prior turns appear in history
Disable again → history skipped; order preference unchanged when posting only the context flag
## Summary
- Closes [#33](https://git.aimloperations.com/ai_ml_operations/chat_backend/issues/33) — per-user `use_conversation_context` boolean on `CustomUser` (default `false`, opt-in).
- Migration `0034_customuser_use_conversation_context`.
- `GET/POST /api/conversation_preferences` reads/writes the flag; POST sets absolute boolean without toggling `conversation_order` when only this field is sent.
- Chat + document RAG paths skip prior-turn history when the flag is off (`AsyncLLMService`, `AsyncRAGService`, both WS consumers).
## Frontend contract
- Field: `use_conversation_context` (boolean, default false)
- Read: `GET /api/conversation_preferences` → `{ order, use_conversation_context }`
- Write: `POST /api/conversation_preferences` with `{ "use_conversation_context": true|false }`
- Tooltip copy: use previous conversations to better customize the experience
- Counterpart: [chat_web_app#66](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/66)
## Test plan
- [ ] `manage.py test chat_backend.tests.test_models chat_backend.tests.test_views_conversations.ConversationPreferencesTestCase chat_backend.tests.test_services_llm chat_backend.tests.test_services_rag`
- [ ] New user / unset flag → `use_conversation_context` is false; history empty in LLM/RAG prompts
- [ ] Enable via preferences API → prior turns appear in history
- [ ] Disable again → history skipped; order preference unchanged when posting only the context flag
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
use_conversation_contextboolean onCustomUser(defaultfalse, opt-in).0034_customuser_use_conversation_context.GET/POST /api/conversation_preferencesreads/writes the flag; POST sets absolute boolean without togglingconversation_orderwhen only this field is sent.AsyncLLMService,AsyncRAGService, both WS consumers).Frontend contract
use_conversation_context(boolean, default false)GET /api/conversation_preferences→{ order, use_conversation_context }POST /api/conversation_preferenceswith{ "use_conversation_context": true|false }Test plan
manage.py test chat_backend.tests.test_models chat_backend.tests.test_views_conversations.ConversationPreferencesTestCase chat_backend.tests.test_services_llm chat_backend.tests.test_services_raguse_conversation_contextis false; history empty in LLM/RAG prompts55b615bb5bto35ffd590ba