[DRAFT] Add a memory mode backed by ClickHouse#83
Open
Ryado wants to merge 1 commit intoClickHouse:mainfrom
Open
[DRAFT] Add a memory mode backed by ClickHouse#83Ryado wants to merge 1 commit intoClickHouse:mainfrom
Ryado wants to merge 1 commit intoClickHouse:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces experimental memory management functionality that allows storing and retrieving key-value data using ClickHouse as the backend storage. The feature is controlled by the CLICKHOUSE_MEMORY environment variable and provides a set of tools for persistent memory operations.
Key changes:
- Add five new memory management tools: save_memory, get_memories_titles, get_memory, get_all_memories, and delete_memory
- Implement conditional tool registration based on CLICKHOUSE_MEMORY environment variable
- Add comprehensive test coverage for all memory operations
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mcp_clickhouse/mcp_env.py | Adds memory_enabled property to configuration for controlling memory tool availability |
| mcp_clickhouse/mcp_server.py | Implements memory management functions and conditional tool registration |
| tests/test_tool.py | Adds comprehensive test suite for memory functionality |
| pyproject.toml | Adds pytest development dependency |
| README.md | Documents the new experimental memory tools and configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
|
|
||
| def delete_memory(key: str): | ||
| """Delete all memory entries matching the specified key from the user memory table. Warining this tool should only be used when explicitly requested by the user""" |
There was a problem hiding this comment.
Corrected spelling of 'Warining' to 'Warning'.
Suggested change
| """Delete all memory entries matching the specified key from the user memory table. Warining this tool should only be used when explicitly requested by the user""" | |
| """Delete all memory entries matching the specified key from the user memory table. Warning this tool should only be used when explicitly requested by the user""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces experimental memory management tools that allow storing and retrieving key-value data using ClickHouse as the backend storage.
New Tools Added
Implementation Details
screen_record.mp4