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

Refactor to v4 #376

Merged
merged 60 commits into from
Apr 17, 2024
Merged

Refactor to v4 #376

merged 60 commits into from
Apr 17, 2024

Conversation

sudoskys
Copy link
Member

@sudoskys sudoskys commented Apr 16, 2024

Important improvements

  • Redis and MongoDB are no longer must required.
  • All data methods have been reimplemented.
  • Use cleaner code.
  • Use asynchronous Telegram notifier.
  • Better plug-in development implementation.
  • Compatibility improved.

sudoskys added 30 commits April 14, 2024 12:31
🚧 fix(extra/user/schema): fix indentation for class methods

🔧 refactor(extra/user/__init__): update import statement for LlmConfig
🔧 chore: refactor code to improve readability and maintainability

🚧 refactor: restructure code to enhance performance

📝 docs: update documentation for better understanding

🐛 fix: correct logic for uploading files in Telegram

🔒 security: enhance security measures for user authentication

🛠️ style: improve code formatting and style

🔥 remove: eliminate redundant code for optimization

🚀 optimize: enhance performance for faster execution

📦 build: compile code for deployment

🔊 log: add logging to track application events

🧪 test: write test cases for new functionality

🔑 auth: handle user authentication for secure access
🔧 chore: refactor code to improve readability and maintainability

🚧 refactor: restructure code to enhance performance

📝 docs: update documentation for better understanding

🐛 fix: correct logic for uploading files in Telegram

🔒 security: enhance security measures for user authentication

🛠️ style: improve code formatting and style

🔥 remove: eliminate redundant code for optimization

🚀 optimize: enhance performance for faster execution

📦 build: compile code for deployment

🔊 log: add logging to track application events

🧪 test: write test cases for new functionality

🔑 auth: handle user authentication for secure access
Add new functionalities for file management, environment variables, base
key-value manager, and user instructions.
- Add BaseMessageStorage class for memory storage
- Add LocalStorage class for local file storage
- Add RedisChatMessageHistory class for redis storage
🔒 refactor: updated PREFIX variable value
🚀 feat: added methods to BaseRuntime class
🎉 feat: added ElaraRuntime class
🎉 feat: added RedisRuntime class
🚀 feat: added ElaraClientAsyncWrapper class
🚀 feat: added RedisClientWrapper class
…py files

   for better organization and consistency with the project structure
- Added receiver_client.py file with authorization generation and tool organization functions
- Added function.py file with snapshot creation and user notification functions
- Added receiver_client.py file with authorization generation and tool organization functions
- Added function.py file with snapshot creation and user notification functions
- Added new file `__init__.py` for telegram receiver module.
- Implemented TelegramSender class for sending messages.
- Implemented TelegramReceiver class for receiving messages.
- Added TelegramBotRunner class with methods for message handling, task creation, and file uploading
- Implemented message handlers for commands like login, env, clear, help, tool, auth
- Added message handlers for private and group messages to create tasks
- Renamed event.py to app/sender/telegram/event.py for better organization
- Added platform setting file for different bot platforms
- Added database setting file for RabbitMQ configuration
Two new files added: _exception.py with ChainBuildException class and const.py with DBNAME constant.
Two new files added: _exception.py with ChainBuildException class and const.py with DBNAME constant.
Two new files added: _exception.py with ChainBuildException class and const.py with DBNAME constant.
Two new files added: _exception.py with ChainBuildException class and const.py with DBNAME constant.
Added classes for database clients to interact with MontyDB and MongoDB,
including methods for ping, insert, find, and update operations.
Copy link
Contributor

coderabbitai bot commented Apr 16, 2024

Important

Auto Review Skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

109 files out of 201 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sudoskys sudoskys changed the title Refractor to v4 Refactor to v4 Apr 16, 2024
@sudoskys sudoskys self-assigned this Apr 16, 2024
- Adjusted indentation for parameters in methods
- Fixed logic for task snapshot credential processing
@sudoskys sudoskys marked this pull request as draft April 16, 2024 14:09
sudoskys added 22 commits April 16, 2024 22:13
- Check if file exists before appending messages
- Add touch method to create file if it does not exist
- Move fsync inside the loop to ensure messages are written
… field

- Add Optional annotation to llm_response field in schema.py file
… field

- Add Optional annotation to llm_response field in schema.py file
⚙️ chore[cell]: Refactor field_validator for content in cell.py

🔧 refactor[request]: Refactor check_stop method in request.py

⚙️ chore[__init__]: Refactor consuming_task method in __init__.py

🔧 refactor[_base]: Refactor SnapData class in _base.py
…olCall classes

⚙️ refactor: update cell.py to include json_arguments property in FunctionCalled

🔧 fix: update request.py to include UserMessage in messages field

🔨 chore: update alarm/__init__.py to use sync method for send_notify

📝 docs: add TODO comment in FileSnapshotStorage class
🔧 refactor: add validate_mock2 function in jsonf.py
- Fixed incorrect indentation in app.py file.
Move OpenaiMiddleware import to the correct location in the file.
Clean up unused imports and optimize import statements.
Move OpenaiMiddleware import to the correct location in the file.
Clean up unused imports and optimize import statements.
- update the current_env variable to an empty dictionary if it is empty
- Updated Telegram event commands for better user interaction
- Added a new command '/login' for users to login via URL or raw data
🔧 Chore: update llmkira sender kook and slack tool list
🔒 security: update llmkira sender kook auth functionality
🔧 fix: Update default_disable_tool_action value

🔧 fix: Update default_disable_tool_action value

🔧 fix: Update default_disable_tool_action value

🔧 fix: Update default_disable_tool_action value
Temporarily deprecate the loop_turn_only_message function due to changes in
the project requirements.
- Update deployment and development documentation links to English
- Translate plugin previews and platform support sections to English
- Update deployment and development documentation links to English
- Translate plugin previews and platform support sections to English
@sudoskys sudoskys marked this pull request as ready for review April 17, 2024 05:16
@sudoskys sudoskys merged commit a2408e7 into main Apr 17, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Too many trash code [BUG] Make api_key a SecretStr Telegram Markdown Auto Patch
1 participant