Fix/bot Fix Memory Consolidation Issues and Integrate Vikingbot as OpenViking Optional Dependency#492
Fix/bot Fix Memory Consolidation Issues and Integrate Vikingbot as OpenViking Optional Dependency#492MaojiaSheng merged 21 commits intomainfrom
Conversation
… and async - Fix _consolidate_memory hook error by creating temporary Session when given message list - Remove duplicate session save logic from _consolidate_memory (handled by caller) - Make normal memory consolidation async like /new command - Other fixes: streaming response in CLI and OpenAPI channel
- Add vikingbot dependencies to pyproject.toml optional-dependencies - Update install prompts from vikingbot[X] to openviking[bot-X] - Update README installation instructions - Configure setuptools to find vikingbot in bot/ directory - Add vikingbot package data and script entry
vikingbot is now integrated as part of openviking, no need for separate pyproject.toml
- Update from 'uv pip install -e bot/' to 'uv pip install -e ".[bot]"' - Add quotes around openviking[bot] for shell safety
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Cache VikingClient instances by workspace_id to avoid repeated client creation - Add _client_cache dictionary for caching - Add get_cached_client() helper function - Update both hooks to use cached client
- Change from per-workspace_id cache to true global singleton - Create client with None as agent_id (works for all workspaces) - Simplify client management
Description
This PR contains two main parts:
errors, async issues, etc.)
project structure
Detailed Changes
1.1 Fix Memory Consolidation Issues
multiple times
1.2 Related File Changes
improvements
2.1 Root pyproject.toml Updates
in bot/ directory
etc.)
2.2 Update Install Prompts in Code (11 files)
Update all install prompts from vikingbot[X] format to openviking[bot-X]:
2.3 Documentation Updates
pip install -e bot/ to uv pip install -e ".[bot]"
the new openviking optional dependency approach
2.4 Remove Independent Configuration
3.1 Rust CLI Enhancements
3.2 Test File Adjustments
3.3 Server Related
optimization
New Installation Methods
Install from PyPI (basic version)
pip install "openviking[bot]"
Install from source (development version)
uv pip install -e ".[bot]"
With optional features
uv pip install -e ".[bot,bot-telegram,bot-langfuse]"
Full version (all features included)
uv pip install -e ".[bot-full]"
Modified Files (33 files)
Added/Modified:
Deleted:
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes