-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(app): streamline chatbot architecture and add tool integration #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Refactor the chatbot architecture to simplify the RAG pipeline and introduce a tool registry for handling common queries. Add support for text-to-speech functionality and improve file management by cleaning up temporary files. Update the README to reflect the new features and architecture.
Simplify the build system by switching from poetry to setuptools. Update dependencies in requirements.txt and pyproject.toml to ensure compatibility and include necessary packages for the chatbot. Additionally, streamline the CI workflow by removing redundant linting steps and updating actions.
Add a new OS smoke test workflow to verify basic functionality across different operating systems. Update the Python package workflow to include OS testing and improve test coverage by ensuring compatibility with multiple Python versions and operating systems.
Add a GitHub Actions workflow to test core functionality on push and pull request events. The workflow sets up Python 3.11, installs minimum requirements, and verifies the app structure by importing the core component.
The previous setup had multiple workflows (basic-test.yml, os-smoke-test.yml, python-package.yml) with overlapping functionality. These have been removed and replaced with a single verify.yml workflow that focuses on verifying the core Python setup. This simplifies maintenance and reduces redundancy in the CI pipeline.
Update the workflow name to better reflect its purpose and enhance the verification process by installing required packages and adding basic functionality tests for the OllamaChat class
The python-dotenv package is required to load environment variables in the basic functionality test. This ensures the test can access necessary configurations during execution.
Update the verification workflow to install dependencies from requirements.txt instead of listing them individually. Modify the basic functionality test to skip actual initialization of OllamaChat to avoid unnecessary API calls, focusing on verifying successful imports instead.
khaosans
added a commit
that referenced
this pull request
Jun 23, 2025
…on (#3) * refactor(app): streamline chatbot architecture and add tool integration Refactor the chatbot architecture to simplify the RAG pipeline and introduce a tool registry for handling common queries. Add support for text-to-speech functionality and improve file management by cleaning up temporary files. Update the README to reflect the new features and architecture. * build: migrate from poetry to setuptools and update dependencies Simplify the build system by switching from poetry to setuptools. Update dependencies in requirements.txt and pyproject.toml to ensure compatibility and include necessary packages for the chatbot. Additionally, streamline the CI workflow by removing redundant linting steps and updating actions. * ci: add OS smoke test and update Python package workflow Add a new OS smoke test workflow to verify basic functionality across different operating systems. Update the Python package workflow to include OS testing and improve test coverage by ensuring compatibility with multiple Python versions and operating systems. * ci: add basic-test workflow for core functionality Add a GitHub Actions workflow to test core functionality on push and pull request events. The workflow sets up Python 3.11, installs minimum requirements, and verifies the app structure by importing the core component. * test: add basic test for OllamaChat initialization * ci: consolidate GitHub workflows into a single verify.yml The previous setup had multiple workflows (basic-test.yml, os-smoke-test.yml, python-package.yml) with overlapping functionality. These have been removed and replaced with a single verify.yml workflow that focuses on verifying the core Python setup. This simplifies maintenance and reduces redundancy in the CI pipeline. * ci: rename workflow and add functionality tests Update the workflow name to better reflect its purpose and enhance the verification process by installing required packages and adding basic functionality tests for the OllamaChat class * ci(workflows): add python-dotenv to verify workflow dependencies The python-dotenv package is required to load environment variables in the basic functionality test. This ensures the test can access necessary configurations during execution. * ci(verify): update workflow to use requirements.txt and skip API calls Update the verification workflow to install dependencies from requirements.txt instead of listing them individually. Modify the basic functionality test to skip actual initialization of OllamaChat to avoid unnecessary API calls, focusing on verifying successful imports instead.
khaosans
added a commit
that referenced
this pull request
Jun 23, 2025
) * Enhance Streamlit app with improved chat interface and document processing. Introduce fixed models for chat, embeddings, and image analysis. Update session state initialization with a welcome message and better error handling. Refactor document upload progress display for a smoother user experience. Improve UI with custom CSS for chat messages and file uploads. Update README.md to reflect architectural changes and new features. * Refactor Streamlit app and document processor for enhanced functionality. Introduce Chroma DB for document storage and retrieval, improving file processing and search capabilities. Update session state management and error handling. Enhance user experience with a more intuitive chat interface and improved document upload handling. Clean up legacy code and ensure compatibility with existing features. * Update .gitignore to include additional files and directories for better project management. Revise README.md to enhance clarity and structure, incorporating ASCII diagrams for improved understanding of the document-aware chat assistant architecture and features. Streamline installation instructions and configuration setup for user convenience. * Revise README.md to update project description and enhance clarity with a new architecture diagram using Mermaid. Expand features section to detail document processing, chat interface, and RAG implementation. Update installation instructions and prerequisites for better user guidance. Change setup.py permissions for execution. * Add chat interface image to assets for enhanced UI representation * readme * Create python-package.yml * add paper * Tool prompt * refactor(app): streamline chatbot architecture and add tool integration (#3) * refactor(app): streamline chatbot architecture and add tool integration Refactor the chatbot architecture to simplify the RAG pipeline and introduce a tool registry for handling common queries. Add support for text-to-speech functionality and improve file management by cleaning up temporary files. Update the README to reflect the new features and architecture. * build: migrate from poetry to setuptools and update dependencies Simplify the build system by switching from poetry to setuptools. Update dependencies in requirements.txt and pyproject.toml to ensure compatibility and include necessary packages for the chatbot. Additionally, streamline the CI workflow by removing redundant linting steps and updating actions. * ci: add OS smoke test and update Python package workflow Add a new OS smoke test workflow to verify basic functionality across different operating systems. Update the Python package workflow to include OS testing and improve test coverage by ensuring compatibility with multiple Python versions and operating systems. * ci: add basic-test workflow for core functionality Add a GitHub Actions workflow to test core functionality on push and pull request events. The workflow sets up Python 3.11, installs minimum requirements, and verifies the app structure by importing the core component. * test: add basic test for OllamaChat initialization * ci: consolidate GitHub workflows into a single verify.yml The previous setup had multiple workflows (basic-test.yml, os-smoke-test.yml, python-package.yml) with overlapping functionality. These have been removed and replaced with a single verify.yml workflow that focuses on verifying the core Python setup. This simplifies maintenance and reduces redundancy in the CI pipeline. * ci: rename workflow and add functionality tests Update the workflow name to better reflect its purpose and enhance the verification process by installing required packages and adding basic functionality tests for the OllamaChat class * ci(workflows): add python-dotenv to verify workflow dependencies The python-dotenv package is required to load environment variables in the basic functionality test. This ensures the test can access necessary configurations during execution. * ci(verify): update workflow to use requirements.txt and skip API calls Update the verification workflow to install dependencies from requirements.txt instead of listing them individually. Modify the basic functionality test to skip actual initialization of OllamaChat to avoid unnecessary API calls, focusing on verifying successful imports instead. * docs: update README with detailed project overview and features (#4) Enhance the README file to provide a comprehensive description of the project, including key features, architecture diagrams, system requirements, installation guide, troubleshooting tips, roadmap, contributing guidelines, and acknowledgments. This update aims to improve the onboarding experience for new users and contributors by providing clear and detailed documentation. * docs: add chat interface image to README (#5) The chat interface image has been added to the README to visually showcase the application's user interface, enhancing the documentation and providing a better understanding of the project's appearance. * docs: update README with enhanced image description Add a more detailed description for the chat interface image in the README file to provide better context for users * docs: update README with enhanced diagrams and descriptions Improve the README by adding detailed diagrams with color coding and tooltips for better understanding of the system architecture, document processing pipeline, memory management, and tool integration flow. Also, update the interface descriptions to highlight new features and user experience improvements. * docs: update README with build instructions and add LICENSE Add detailed build instructions to the README file, including steps for running the build script and its functionalities. Also, include the MIT LICENSE file to formalize the project's licensing terms. * chore: remove unused files including conda.yaml and generic-tool-prompt.txt This commit removes unused files from the repository to clean up the codebase. The files include a PDF, a conda environment configuration file, and a generic tool prompt template that are no longer needed. * docs: simplify and condense README.md content Remove redundant details, streamline feature descriptions, and improve overall readability. Focus on essential information for easier onboarding and maintenance. * docs: update README.md with detailed core capabilities Enhance the README.md to provide a more comprehensive and structured overview of the core capabilities of BasicChat. This includes detailed descriptions of local LLM integration, advanced context management, multi-modal support, RAG-powered document analysis, vector storage, and smart system features. * feat: Add reasoning capabilities with Mistral model - Add comprehensive reasoning engine with Chain-of-Thought, Multi-Step, and Agent-Based reasoning - Switch default model to Mistral for better reasoning performance - Add model selector in Streamlit sidebar - Improve CoT display with step-by-step visualization - Add comprehensive test suite with clear PASS/FAIL indicators - Update dependencies for latest LangChain and Ollama integration - Fix ChatOllama integration and prompt templates for better reasoning * docs: Add comprehensive reasoning capabilities documentation * Final cleanup, updated docs, diagrams, and tests passing. Ready for PR. * docs: Revise README.md for clarity and detail - Update system architecture diagrams and descriptions - Enhance reasoning modes flow and document processing pipeline - Add memory management and model interaction flow diagrams * feat: Enhance web search functionality with error handling and caching - Implement retry logic for search queries - Add fallback results for failed searches - Improve tool descriptions in reasoning agent * feat: Add utility modules and configuration management - Introduce utility functions for caching and async operations - Implement AppConfig for environment-based configuration - Update requirements for performance improvements - Enhance test coverage for caching and configuration * feat: Enhance reasoning agent with advanced tools - Introduce EnhancedCalculator and EnhancedTimeTools - Improve time-related functionalities with detailed outputs - Update tool descriptions for clarity and usability (#9) * feat: Expand reasoning features with enhanced tools - Introduce Enhanced Calculator and Advanced Time Tools - Improve web search integration with caching and retry logic - Update documentation for clarity and usage examples (#10) * docs: Enhance README.md with detailed feature descriptions and refere… (#11) * docs: Enhance README.md with detailed feature descriptions and references - Improve clarity on performance, reasoning engine, document processing, and developer experience - Add academic citations for methodologies and technologies used * docs: Add comprehensive installation and architecture guides - Include system requirements, installation steps, and advanced configuration options - Detail system architecture and data flow for better understanding * docs: Revise documentation structure for clarity and accessibility - Update README.md with organized sections for getting started, technical documentation, and planning - Enhance DEVELOPMENT.md and ARCHITECTURE.md with related documentation and references - Improve navigation links across all documents * docs: Enhance README.md with a structured Table of Contents - Add sections for key features, quick start, documentation, testing, contributing, performance metrics, configuration, and references - Improve navigation and accessibility for users * docs: Revamp README.md for enhanced clarity and user engagement - Update overview, key features, and tools sections - Improve formatting and add user-centric descriptions for better understanding * feat: Add asset generation script for branding - Implement functional… (#12) * feat: Add asset generation script for branding - Implement functionality to create logo, favicon, and social media images from a provided logo file - Enhance README.md with detailed academic references and citations * docs: Add works cited sections to README.md, ARCHITECTURE.md, and DEVELOPMENT.md - Include academic references to enhance documentation credibility and provide sources for further reading * feat: Add demo section to README.md and improve audio handling in app.py - Include demo details showcasing key features - Enhance text_to_speech and get_audio_html functions with error handling - Introduce comprehensive tests for voice functionality * feat: add demo GIF to README and document known timezone issues * fix: update .gitignore to track assets directory * add gif * fix: update demo image in README.md to use new branding asset * fix: update demo image in README.md to use GIF for better visualization * test: Add unit tests for enhanced audio functionality - Implement tes… (#13) * test: Add unit tests for enhanced audio functionality - Implement tests for audio button initialization, HTML generation, error handling, and file size display * refactor: Rename audio HTML generation function and update related tests - Change get_enhanced_audio_html to get_professional_audio_html and adjust tests for consistency and modern styling * feat: Enhance text-to-speech functionality with error handling and loading states - Implement checks for existing audio files, improve error management, and add user feedback during audio generation * feat: Improve audio generation with threading and error handling - Implement asynchronous audio generation with timeout, enhance error management, and update loading state in UI * feat: Enhance audio generation button and error handling - Update button labels for clarity, improve error messaging, and streamline audio generation process * feat: Update configuration management and enhance environment variable support - Refactor config.py to load settings from .env file - Improve README.md with clearer setup instructions * feat: Enhance ChromaDB management and update dependencies - Add clean… (#21) * feat: Enhance ChromaDB management and update dependencies - Add cleanup for old ChromaDB directories on app start - Introduce manual cleanup option in sidebar - Update requirements for langchain and chromadb packages - Modify .gitignore to include new ChromaDB patterns - Remove outdated INSTALLATION.md * feat: Update requirements to include langchain-community package * Clean up * docs: Overhaul architecture documentation and add release notes - Enhance clarity and detail in ARCHITECTURE.md - Introduce comprehensive release notes for version 1.1.0 (#22) * Feature/add logging (#23) * feat: Register signal handlers conditionally based on the main thread - Ensure signal handlers are only set in the main thread to avoid issues in multi-threaded environments - Add logging for skipped registration and exceptions * feat: Update default reasoning mode to 'Auto' and add to available modes - Modify DEFAULT_REASONING_MODE to 'Auto' and include it in REASONING_MODES for improved user experience * update reasoning * docs: Revamp README.md with enhanced visuals and detailed feature descriptions - Improve layout, add demo and performance metrics, and clarify installation steps for better user guidance * docs: Update documentation for clarity and consistency - Revise links… (#25) * docs: Update documentation for clarity and consistency - Revise links and descriptions in DEVELOPMENT.md, ROADMAP.md, and ARCHITECTURE.md * docs: Enhance documentation with detailed diagram narratives - Add comprehensive explanations for testing framework, database cleanup, development workflow, system architecture, async processing, reasoning architecture, and community strategy * docs: Enhance architecture documentation with design rationale and performance considerations - Add detailed explanations for strategy pattern, chunking strategy, embedding optimization, connection pool architecture, rate limiting, caching strategy, and error handling * docs: Update Reasoning Features documentation for consistency - Remove emojis from subgraph titles for a cleaner presentation * docs: Update Reasoning Features documentation for clarity - Replace subgraph titles with icons for improved visual presentation * docs: Revise README, ARCHITECTURE, DEVELOPMENT, and FEATURES documentation for clarity and consistency - Update section titles, add references, and enhance workflow descriptions * docs: Add references and resources to various documentation files for enhanced clarity and research support * docs: Remove outdated references from RELEASE_NOTES, TECHNICAL_OVERVIEW, and DEVELOPMENT documentation for clarity and conciseness * docs: Remove emoji from Core Features section title for cleaner presentation * docs: Add new references to README for enhanced resource support and clarity * feat: Update pytest configuration and improve test reporting - Enhance test discovery settings - Refactor coverage reporting options - Add new markers for test categorization - Remove obsolete test files * feat: Enhance audio and document processing tests - Improve gTTS integration with threading mocks - Update calculator tests to return float values - Refactor document processor tests for better mock handling * feat: Refactor reasoning tests for improved clarity and structure - Update method names for consistency - Enhance mock handling in tests - Ensure proper response structure in agent and chain reasoning * feat: Improve reasoning execution and testing - Ensure execution_time is always defined - Refactor mock handling in tests for clarity - Update agent response structure to use dict - Enhance error handling in reasoning agent tests * feat: Update testing workflow and documentation - Simplify pytest command in CI - Remove coverage threshold from pytest configuration - Add comprehensive testing documentation * feat: Enhance test for OllamaChat payload handling - Mock asyncio.run to simulate responses - Ensure correct type assertion for different payloads * fix: Rename workflow to 'verifyExpected' to match required check * feat: Update workflow to target main branch and use latest actions * feat: Update pytest configuration and improve test reporting - Enhanc… (#26) * feat: Update pytest configuration and improve test reporting - Enhance test discovery settings - Refactor coverage reporting options - Add new markers for test categorization - Remove obsolete test files * feat: Enhance audio and document processing tests - Improve gTTS integration with threading mocks - Update calculator tests to return float values - Refactor document processor tests for better mock handling * feat: Refactor reasoning tests for improved clarity and structure - Update method names for consistency - Enhance mock handling in tests - Ensure proper response structure in agent and chain reasoning * feat: Improve reasoning execution and testing - Ensure execution_time is always defined - Refactor mock handling in tests for clarity - Update agent response structure to use dict - Enhance error handling in reasoning agent tests * feat: Update testing workflow and documentation - Simplify pytest command in CI - Remove coverage threshold from pytest configuration - Add comprehensive testing documentation * feat: Enhance test for OllamaChat payload handling - Mock asyncio.run to simulate responses - Ensure correct type assertion for different payloads * fix: Rename workflow to 'verifyExpected' to match required check * feat: Update workflow to target main branch and use latest actions * chore: relocate tests into tests/ folder, update config * chore: relocate tests into tests/ folder, update config and fix imports * test: enhance test_voice.py to mock file creation and verify output * feat: add LLM Judge Evaluator for code quality assessment in CI pipeline * refactor: update text-to-speech implementation to a lightweight local approach, modify evaluator configuration, and adjust CI workflow for Ollama setup * chore: update GitHub Actions to use latest cache and upload artifact versions; revise documentation for local text-to-speech feature * chore: update .gitignore to include coverage files and improve environment management * feat: optimize LLM Judge evaluation in CI/CD by enabling parallel execution, adding quick evaluation mode, and implementing Docker-based setup with model caching * feat: enhance LLM Judge evaluation with GitHub Models fallback, update model configuration, and add troubleshooting documentation * Recreate GitHub Models scripts without hardcoded tokens * Fix LLM Judge workflow: improve error handling, try multiple models, add mock fallback * feat: integrate OpenAI LLM Judge evaluation, update requirements, and add testing script * feat: enhance LLM Judge recommendations format with actionable checklist items and prioritized actions * feat: implement LLM Judge consistency checks with detailed rubrics and versioning * feat: add pull request template for consistent contributions and review process * feat: update requirements and enhance test configurations with new markers and fixtures * feat: refine test markers and enhance audio testing with improved mocks and validations * feat: update CI workflow to run all unit/fast tests without marker filtering * feat: simplify CI workflow by consolidating test jobs and removing redundant configurations * fix: repair failing audio and document tests * fix: resolve all test failures and warnings - Fix audio test assertion to match actual error message - Convert test functions to use assertions instead of returning values - Register custom pytest markers to eliminate warnings * feat: implement resilient testing strategy - Separate unit tests from integration tests in CI pipeline - Add comprehensive test runner script with different modes - Create robust test configuration with proper mocking - Add detailed testing strategy documentation - Reduce CI flakiness by isolating external dependencies
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.
Refactor the chatbot architecture to simplify the RAG pipeline and introduce a tool registry for handling common queries. Add support for text-to-speech functionality and improve file management by cleaning up temporary files. Update the README to reflect the new features and architecture.