Skip to content
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

[WIP] webui #15

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

sosacrazy126
Copy link

RA.Aid/memlog/webui_restructure.md

sosacrazy126 and others added 3 commits December 26, 2024 05:43
- Created WebUIConfig class in webui/config.py

- Added load_environment_status function

- Updated imports in webui/app.py

- Created webui/__init__.py for proper package structure
- Added configuration validation for required fields in implementation, planning, and research components.
- Updated global memory configuration to store the current settings across components.
- Enhanced error handling to log and display specific configuration errors to the user.
- Improved type hints for function parameters and return types for better clarity.
- Refactored message processing in the WebUI to ensure proper handling of task results and connection status.
- Updated tests to mock new configurations and ensure robust coverage for the changes made.
@sosacrazy126 sosacrazy126 changed the title [WIP]Fi webui [WIP] webui Dec 26, 2024
@ai-christianson
Copy link
Owner

It looks like your .venv got committed. Can you delete that from the branch? You might have to locally git rm -rf .venv, add it to git ignore, commit/push, then recreate your venv.

@ai-christianson ai-christianson mentioned this pull request Dec 27, 2024
sosacrazy126 and others added 18 commits December 27, 2024 18:50
- Updated test cases in `test_implementation.py` to include 'hil' configuration in the setup.
- Enhanced `test_app.py` by introducing fixtures for mocking global memory and resetting it before each test.
- Improved message queue processing tests to utilize mocks for better isolation and reliability.
- Ensured consistent state management across tests by using fixtures for mocking components and memory.
- Simplified mocking of Streamlit components and global memory in tests.
- Introduced new fixtures for better state management and isolation in tests.
- Enhanced logging in the main function to provide detailed insights during the execution phases (research, planning, implementation).
- Improved handling of research-only mode to skip planning phase when necessary.
- Updated tests to cover new functionality and ensure robust validation of the main flow.
- Added configuration validation for required fields in the research component.
- Improved error handling to log and display specific configuration errors.
- Enhanced message processing to support various message types (error, status, research, success) in the WebUI.
- Updated global memory to store research results and configuration settings.
- Refactored the research component to parse and display research notes and key facts effectively.
- Improved test coverage for the research component and message handling in the WebUI.
- Updated pytest.ini to include new asyncio settings for stricter testing behavior.
- Moved WebUI configuration to a dedicated webui package for better organization.
- Created WebUIConfig class to encapsulate configuration settings.
- Added load_environment_status function to streamline environment checks.
- Updated relevant imports in webui/app.py to reflect new structure.
- Improved error handling across components to log and display specific configuration issues.
- Enhanced test coverage for the new configuration structure and error handling improvements.
- Introduced a new function to determine interaction type based on user input (conversation, research, implementation).
- Implemented dedicated handlers for conversation and research interactions to streamline user experience.
- Updated the main function to execute the appropriate pipeline based on the determined interaction type.
- Improved logging for interaction type determination and handling processes.
- Enhanced user message processing and response generation for conversation interactions.
…r to __init__.py - Reorganize tests - Remove redundant files - Update config and WebSocket - Improve docs
@ai-christianson
Copy link
Owner

image

I got this initially. It was because I had the wrong API key set for OPENAI (but correct one for anthropic). Once I fixed it, I didn't see the error anymore. Might be good to have some kind of validation of the API credentials and give the user a clear message on that.

image

Once I got the API issue fixed, I was able to submit a query and get a basic response. It seems to not be spawning any agent activity yet, not sure if that's expected.

@sosacrazy126
Copy link
Author

the CiaynAgent integration needs to be properly handled in the WebUI

- Added new agent functions: run_research_agent, run_web_research_agent, run_planning_agent, and run_task_implementation_agent to streamline agent operations.
- Improved error handling in tool execution with validation checks for tool calls.
- Refactored LLM initialization to support temperature and max_tokens parameters.
- Updated WebUIConfig to include temperature and max_tokens settings, enhancing configuration flexibility.
- Enhanced logging for better traceability during agent operations.
- Added unit tests for new agent functionalities and error handling scenarios.
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.

2 participants