LlmKira / Openaibot

⚑️ Build Your Own chatgpt Bot|πŸ§€ Discord/Slack/Kook/Telegram |β›“ ToolCall|πŸ”– Plugin Support | 🌻 out-of-box | gpt-4o
https://llmkira.github.io/Docs
Apache License 2.0
1.93k stars 229 forks source link

✨ Image input #389

Closed sudoskys closed 4 months ago

sudoskys commented 4 months ago

Summary by CodeRabbit

coderabbitai[bot] commented 4 months ago

Walkthrough

The recent update brings significant enhancements to the system's functionality. It introduces a new entity, TimerObjectContainer, for efficient object management based on user IDs and timestamps. Moreover, improvements in file processing and handling within private messages aim to provide a smoother user experience, particularly in the Telegram module.

Changes

Files Change Summary
app/sender/telegram/__init__.py,
app/sender/util_func.py
Introduced TimerObjectContainer for efficient object management. Enhanced file handling and processing in private messages.
app/middleware/llm_task.py,
app/receiver/slack/__init__.py
Updated message handling and error logging. Changes in function signatures and imports for better message processing.
llmkira/openai/cell.py,
llmkira/openai/request.py
Added new classes and methods for content handling and image processing. Improved URL formatting and vision-related checks.
llmkira/openai/utils.py,
llmkira/task/schema.py
Introduced image resizing function and significant modifications to message handling for different platforms.
README.md Updated model adherence, new features, and roadmap details.

Recent Review Details **Configuration used: CodeRabbit UI**
Commits Files that changed from the base of the PR and between ead4058f5ba0c78cedcfaa51adf1dda54cf5195d and 96778324a039c1798a537a2d2aec20f6a592b9cf.
Files selected for processing (1) * README.md (2 hunks)
Additional Context Used
LanguageTool (66)
README.md (66)
Near line 40: Possible spelling mistake found. Context: ...️ > Python>=3.9 This project uses the ToolCall feature. It integrates a message queui... --- Near line 42: β€˜prior to’ might be wordy. Consider a shorter alternative. Context: ...ng plugin mechanisms and authentication prior to plugin execution. The model adheres to... --- Near line 45: Possible spelling mistake found. Context: ...in execution. The model adheres to the Openai Format Schema. Please adapt using [gate... --- Near line 46: Possible spelling mistake found. Context: ...ps://github.com/Portkey-AI/gateway) or [one-api](https://github.com/songquanpeng/one-ap... --- Near line 48: Possible typo: you repeated a whitespace Context: ...quanpeng/one-api) independently. | Demo | Vision With Voice | |------... --- Near line 48: Possible typo: you repeated a whitespace Context: ... | Vision With Voice | |-----------------------------------|-... --- Near line 79: Loose punctuation mark. Context: ...s ### πŸ” Login Modes - `Login via url`: Use `/login token$https://provider.com`... --- Near line 79: Possible spelling mistake found. Context: ... πŸ” Login Modes - `Login via url`: Use `/login token$https://provider.com` to Login. The program p... --- Near line 81: The currency mark is usually put at the beginning of the number. Context: ...onfiguration information - `Login`: Use `/login https://api.com/v1$key$model` to login ### πŸ§€ Plugin Previ... --- Near line 85: Possible typo: you repeated a whitespace Context: ... πŸ§€ Plugin Previews | Sticker Converter | Timer Function | Tran... --- Near line 85: Possible typo: you repeated a whitespace Context: ...erter | Timer Function | Translate Function ... --- Near line 85: Possible typo: you repeated a whitespace Context: ...on | Translate Function | |-------------------------------------... --- Near line 91: Possible typo: you repeated a whitespace Context: ...atform | Support | File System | Remarks | |----------|---------|-------------|--... --- Near line 93: Possible typo: you repeated a whitespace Context: ...------------------------| | Telegram | βœ… | βœ… | ... --- Near line 93: Possible typo: you repeated a whitespace Context: ...--------------| | Telegram | βœ… | βœ… | ... --- Near line 93: Possible typo: you repeated a whitespace Context: ...--| | Telegram | βœ… | βœ… | | | Discord | βœ… | βœ… | ... --- Near line 94: Possible typo: you repeated a whitespace Context: ... | | Discord | βœ… | βœ… | ... --- Near line 94: Possible typo: you repeated a whitespace Context: ... | | Discord | βœ… | βœ… | ... --- Near line 94: Possible typo: you repeated a whitespace Context: ... | | Discord | βœ… | βœ… | ... --- Near line 94: Possible typo: you repeated a whitespace Context: ... | | Discord | βœ… | βœ… | | | Kook | βœ… | βœ… | D... --- Near line 95: Possible typo: you repeated a whitespace Context: ... | | Kook | βœ… | βœ… | Does not suppo... --- Near line 95: Possible typo: you repeated a whitespace Context: ... | | Kook | βœ… | βœ… | Does not support `trigge... --- Near line 95: Possible typo: you repeated a whitespace Context: ... | | Kook | βœ… | βœ… | Does not support `triggering by reply`... --- Near line 96: Possible typo: you repeated a whitespace Context: ... support `triggering by reply` | | Slack | βœ… | βœ… | Does not suppo... --- Near line 96: Possible typo: you repeated a whitespace Context: ...t `triggering by reply` | | Slack | βœ… | βœ… | Does not support `trigge... --- Near line 96: Possible typo: you repeated a whitespace Context: ...ing by reply` | | Slack | βœ… | βœ… | Does not support `triggering by reply`... --- Near line 97: Possible spelling mistake found. Context: ...s not support `triggering by reply` | | QQ | ❌ | | ... --- Near line 97: Possible typo: you repeated a whitespace Context: ...not support `triggering by reply` | | QQ | ❌ | | ... --- Near line 97: Possible typo: you repeated a whitespace Context: ...t `triggering by reply` | | QQ | ❌ | | ... --- Near line 97: Possible typo: you repeated a whitespace Context: ...ering by reply` | | QQ | ❌ | | ... --- Near line 97: Possible typo: you repeated a whitespace Context: ...` | | QQ | ❌ | | | | Wechat | ❌ | | ... --- Near line 98: The official name of this popular chat service is spelled with a capital β€œC”. Context: ... | | Wechat | ❌ | | ... --- Near line 98: Possible typo: you repeated a whitespace Context: ... | | Wechat | ❌ | | ... --- Near line 98: Possible typo: you repeated a whitespace Context: ... | | Wechat | ❌ | | ... --- Near line 98: Possible typo: you repeated a whitespace Context: ... | | Wechat | ❌ | | ... --- Near line 98: Possible typo: you repeated a whitespace Context: ... | | Wechat | ❌ | | | | Twitter | ❌ | | ... --- Near line 99: Possible typo: you repeated a whitespace Context: ... | | Twitter | ❌ | | ... --- Near line 99: Possible typo: you repeated a whitespace Context: ... | | Twitter | ❌ | | ... --- Near line 99: Possible typo: you repeated a whitespace Context: ... | | Twitter | ❌ | | ... --- Near line 99: Possible typo: you repeated a whitespace Context: ... | | Twitter | ❌ | | | | Matrix | ❌ | | ... --- Near line 100: Possible typo: you repeated a whitespace Context: ... | | Matrix | ❌ | | ... --- Near line 100: Possible typo: you repeated a whitespace Context: ... | | Matrix | ❌ | | ... --- Near line 100: Possible typo: you repeated a whitespace Context: ... | | Matrix | ❌ | | ... --- Near line 100: Possible typo: you repeated a whitespace Context: ... | | Matrix | ❌ | | | | IRC | ❌ | | ... --- Near line 101: Possible typo: you repeated a whitespace Context: ... | | IRC | ❌ | | ... --- Near line 101: Possible typo: you repeated a whitespace Context: ... | | IRC | ❌ | | ... --- Near line 101: Possible typo: you repeated a whitespace Context: ... | | IRC | ❌ | | ... --- Near line 101: Possible typo: you repeated a whitespace Context: ... | | IRC | ❌ | | | | ... | | | C... --- Near line 102: Possible typo: you repeated a whitespace Context: ... | | ... | | | Create Issue/P... --- Near line 102: Possible typo: you repeated a whitespace Context: ... | | ... | | | Create Issue/PR ... --- Near line 102: Possible typo: you repeated a whitespace Context: ... | | ... | | | Create Issue/PR ... --- Near line 102: Possible typo: you repeated a whitespace Context: ... | | Create Issue/PR | ## πŸ“¦ Quick Start Refer to the [πŸ§€ D... --- Near line 133: Unpaired symbol: β€˜]’ seems to be missing Context: ...pm2.json ``` ### πŸ₯£ Docker Build Hub: [sudoskys/llmbot](https://hub.docker.com/... --- Near line 133: Possible spelling mistake found. Context: ...m2.json ``` ### πŸ₯£ Docker Build Hub: [sudoskys/llmbot](https://hub.docker.com/reposito... --- Near line 133: Possible spelling mistake found. Context: ...`` ### πŸ₯£ Docker Build Hub: [sudoskys/llmbot](https://hub.docker.com/repository/dock... --- Near line 137: β€˜brand new’ seems to be a compound adjective before a noun. Use a hyphen: β€œbrand-new”. Context: ...ompose Installation If you are using a brand new server, you can use the following shell... --- Near line 140: Possible spelling mistake found. Context: ...ng Docker methods. If you have deployed `redis`, `rabbitmq`, `mongodb`, please modify ... --- Near line 140: Possible spelling mistake found. Context: ... methods. If you have deployed `redis`, `rabbitmq`, `mongodb`, please modify the `docker-... --- Near line 140: Possible spelling mistake found. Context: ... you have deployed `redis`, `rabbitmq`, `mongodb`, please modify the `docker-compose.yml... --- Near line 160: Possible spelling mistake found. Context: ...image using `docker-compose pull`. Use `docker exec -it llmbot /bin/bash` to view Shell in Docker, ent... --- Near line 183: Possible spelling mistake found. Context: ...entation. ### Hooks Hooks control the EventMessage in sender and receiver. For example, we... --- Near line 184: This sentence does not start with an uppercase letter. Context: ...e have `voice_hook` in built-in hooks. you can enable it by setting `VOICE_REPLY_M... --- Near line 191: This sentence does not start with an uppercase letter. Context: ...O_VOICE_KEY= ``` use `/env VOICE_REPLY_ME=NONE` to disable t... --- Near line 193: This sentence does not start with an uppercase letter. Context: ...CE_REPLY_ME=NONE` to disable this env. check the source code in `llmkira/extra/voice... --- Near line 194: Possible spelling mistake found. Context: ...ble this env. check the source code in `llmkira/extra/voice_hook.py`, learn to write yo... --- Near line 202: Possible spelling mistake found. Context: ...m) ## πŸ“œ Notice > This project, named OpenAiBot, signifying "Open Artificial Intelligen...
Additional comments not posted (3)
README.md (3)
`45-46`: Update the model to adhere to the Openai Format Schema and provide adaptation links. --- `48-50`: Add the "Vision With Voice" feature to the demo section. --- `62-62`: Add standalone support for gpt-4-turbo and vision to the roadmap.
--- 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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.