Skip to content

Feature/chatbot memory - #133

Merged
Jordan-Leis merged 21 commits into
mainfrom
feature/chatbot-memory
Jun 19, 2026
Merged

Jordan-Leis merged 21 commits into
mainfrom
feature/chatbot-memory

Conversation

@Sam120204

@Sam120204 Sam120204 commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

langgraph for chat memory

Sam120204 and others added 4 commits June 1, 2026 19:56
Document the planned independent chat-session memory model with optional history-session attachment so implementation can follow the agreed LangGraph approach.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- Added functions to create, retrieve, and reset chat session IDs using sessionStorage and in-memory storage.
- Integrated chat session handling in ChatPage component, allowing users to attach history sessions and manage document uploads accordingly.
- Updated UI to reflect changes in session management, including disabling document uploads when a history session is attached.
- Enhanced error handling and user feedback for session-related actions.
- Added user_id field to ChatMemoryRequest to associate requests with specific users.
- Updated invoke method in ChatMemoryService to generate a thread ID using user_id and chat_session_id for better session tracking.
Comment thread frontend/components/ChatPage.tsx Fixed
Comment thread frontend/components/ChatPage.tsx Fixed
Comment thread frontend/utils/chatSession.ts Fixed
Comment thread frontend/utils/chatSession.ts Fixed
Comment thread frontend/utils/chatSession.ts Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Sam120204 and others added 3 commits June 4, 2026 18:02
- Eliminated the attached_session_id field from ChatQueryRequest and related logic in chat_query function.
- Removed associated UI elements and state management for attached session in ChatPage component.
- Cleaned up unused imports and functions related to session attachment, streamlining chat memory service interactions.
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Sam120204 and others added 2 commits June 4, 2026 23:16
- Introduced context usage tracking in ChatMemoryService to monitor token usage and context limits.
- Added ContextWindowExceededError for better error handling when context limits are exceeded.
- Updated ChatPage component to display context usage information, including estimated tokens and omitted message counts.
- Implemented logic to manage context levels (normal, warning, critical) based on usage percentage.
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
@Sam120204
Sam120204 marked this pull request as ready for review June 10, 2026 20:30
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed
Comment thread backend/services/chat_memory/chat_memory_service.py Fixed

@Jordan-Leis Jordan-Leis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jordan-Leis
Jordan-Leis merged commit dab3cd7 into main Jun 19, 2026
10 checks passed
return
try:
asyncio.run(self._close_async_checkpointer_context())
except Exception:
return
try:
await self._async_checkpointer_context.__aexit__(None, None, None)
except Exception:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants