More humanized (anthropomorphic) GPT chat Ai plugin! ? Support multiple personality customization/switching | Give full play to your imagination! ? Preset collection and sharing table (welcome to share various custom characters) ? ? If you like it, please click! Your support is my motivation for continuous updates? Technical exchange/Q&A/Discussion-> : Join the plug-in exchange group-636925153 ?️ ? Claude adapter branch By: 238066asxsa ?
? New NG refactored version releases Nekro-Agent
This is a brand new self-executing agent AI robot based on container technology, which supports human-based role, real-time code writing and execution, high-scalability agent AI, and supports Docker-Compose one-click deployment. Welcome to experience->Nekro-Agent
? NG evolutionary history
? [2023/12/24] v2.2 PresetHub preset sharing center is online
NG dedicated preset sharing center PresetHub is online, and you can directly share personality presets with all plug-in users through interactive instructions | PresetHub backend application open source address
?️ [2023/5/21] The document site is online
The plug-in document site is online. Welcome to visit ng.kro.zone to view the plug-in document. Thank you @lgc2333 for your strong support for document site construction/errata/organization
? [2023/4/14] v2.1 Minecraft server access and game command extension support
After this update, it supports connecting bots to the MC server, and supports bots to use in-game command extensions
? [2023/3/16] v2.0 project reconstruction is completed
Thanks to @Misaka-Mikoto-Tech for their strong support for project reconstruction
✏️ [2023/3/2] v1.4 Update: Supports ChatGPT model
After this update, the plug-in began to support the official ChatGPT model interface. The token price is only 1/10 of GPT3, and the reply quality is higher and the response speed is faster.
? [2023/2/18] v1.3 Update: Custom extension support
After this update, the plug-in began to support custom extensions. You can directly call a variety of extension functions through natural language, including text/picture/voice/mail...
? Installation command
Please execute this command in the Bot directory
nb plugin install nonebot-plugin-naturel-gpt
Feature list
The following unchecked functions only indicate the possible development direction in the future and do not represent the actual planning progress. Specific development matters may change at any time. Check: Functions have been implemented; Unchecked: Development/Planned development/Pending design
Automatic switching of api_key: Supports the use of multiple openai_api_keys at the same time, and automatically switches when invalid
Custom personality presets: Customizable personality presets to create your own personalized TA
Basic contextual relationship between chat: short-term memory contextual relationship between group chat scenes, try to avoid chatting
Chat record summary memory: Automatically summarize chat memory, with a certain degree of long-term memory ability
User impression memory: Each personality remembers each user individually, so that he can remember you
Data persistent storage: TA will not forget you after restarting (using pickle to save files)
Personality switching: You can switch different personalities at any time, and more different TAs
Added/editing personality: Use commands to edit TA's personality at any time
Custom trigger words: I hope you are more proactive? Or more purposeful?
Custom blocking words: Don’t want him to learn bad things? Need to be a little safer?
Randomly participate in the chat: I hope you will take the initiative? TA will bubbling in your group by chance...
Asynchronous support: Give TA more powerful message processing capabilities!
Scalable features: Tired of monotonous Q&A AI? Unlock super powers for TA! TA can actively call extension modules (such as sending pictures, voice, email, etc.) according to your language. The upper limit of TA depends on your imagination.
Multiple response ability: Tired of traditional Q&A chat with one question and one answer? TA can do better!
Actively welcome new group members: Fully automatic welcome to Ji (?) for 24 hours of work
TTS Text to Voice: Let TA speak! (Implemented through the extension module)
Potential personality awakening mechanism: When the user calls for an unenabled personality, the personality can be automatically switched (optional switch)
Timing tasks: You can use natural language to directly time it, letting you remind you that it’s time to have a meal!
Online search/read link: Is the GPT3.5 database outdated? Through active search extension, TA can retrieve the latest information in real time (supports Google, Bing Copilot, etc.)
To output content to picture: Use htmlrender to convert TA's reply to picture to reduce risk control chance (optional switch, thanks to @HMScygnet for providing pr)
Minecraft server access allows her to serve you in the game, using the ability of GPT to write various complex NBT instructions
Message throttling mechanism, when a large number of messages are received in a short time, only the last message will be replyed (configurable)
Stable Diffusion painting access support (need to bring your own drawing API)
PresetHub Preset Sharing Center: Allows sharing of personality presets among all users using this plugin
Active memory and memory management functions: Let TA take the initiative to remember something! hmm let me Kang Kang what did you remember (plan to refactor, to connect to the external memory bank for bot)
Image perception: It is intended to use the image recognition API provided by Tencent Cloud to assist the bot in perceiving the image content
Active chat participation logic: try to imitate human chat participation logic, with the goal of allowing TA to truly integrate into your group
Memoir generation: Record every little thing between you and get your exclusive memories
? Use the documentation
> Click to go to NG Documentation Station
? Development Guide
You can quickly start developing this plug-in by following the following steps
Added makemidi extension to allow bot to perform midi creation (thanks to @CCYellowStar for pr)
Added lolicon_search extension, and after searching for pictures, the image information will be feedback (thanks to @student_2333 for providing pr)
Added extension enable/disable commands. For extensions that do not require additional configuration, they can be enabled directly after installation using the instructions (thanks to @student_2333 for pr)
Added the base_url configuration of OpenAI API to access any third-party interface compatible with OpenAI API format
It is strongly recommended to update to this version above, otherwise some extensions may fail to load.
Optimize the chat to image output style, support code block highlighting (thanks to @student_2333 for pr)
Partially refactored extensions to manage and modify existing extensions to support asynchronous requests (thanks to @student_2333 for pr)
Fix read link extension and search extension API and add anti-duplication mechanism for read links (thanks to @CCYellowStar for pr)
[2023/5/21] v2.1.4 Logic Optimization | Configure Hot Reloading
Added configuration file hot reload function (thanks to @Misaka-Mikoto-Tech for pr)
Add message drop mechanism. For models with slow response, if a new generation request is received before the reply generation is completed, the old request will be discarded to avoid repeated responses.
Fixed the issue where the bot had time and message header before sending a message
[2023/4/17] v2.1.3 Response throttling function | Logical optimization
Added bot response throttling function, which can configure throttling time range, and a large number of messages in a short time will only be responded once at the last one.
Eliminate all types of annotation error prompts for pylance and perform module split optimization (thanks to @Misaka-Mikoto-Tech for pr)
Optimize MC instruction execution extension propt
Specified an effective session type for all picture/voice-related extensions to avoid errors when executing instructions in the MC server
Fixed the problem of sending empty messages by bot error sentence under MC server
Modified the evolution (ext_evolution) extension execution logic, allowing only bot partial updates to the character
Fix throttling logic errors to avoid the problem that bots cannot respond to messages
[2023/4/15] v2.1.1 Minecraft server instruction optimization
Added -show parameter to the rg chats directive to display the full session key so that the -target parameter is used
Optimize feedback information of MC server instruction execution to facilitate bot error correction; optimize MC server instruction preprocessing to avoid adding unnecessary escapes to bot
[2023/4/15] v2.1.0 Minecraft server support
Added Minecraft server access support
Added Minecraft server instruction execution support and related extension modules
Added proxy configuration item support for drawing extensions (thanks to @tonato-01 for pr)
[2023/4/6] v2.0.5 RENAME directive | json export support
When parsing @ in the message, keep the same as the user sees (thanks to @Misaka-Mikoto-Tech for pr)
Optimize DEBUG_LEVEL limits for log output (thanks to @Misaka-Mikoto-Tech for pr)
Optimize the line break generation logic of chat message propt (thanks to @Misaka-Mikoto-Tech for pr)
Added rg rename change instruction to modify personality names (thanks to @Misaka-Mikoto-Tech for providing pr) (thanks to @Misaka-Mikoto-Tech for providing pr)
When parsing @ in the message, keep the same as the user sees (thanks to @Misaka-Mikoto-Tech for pr)
patch logger to display the plugin name in Chinese (thanks @chenxuan353 for pr)
Add memory files (original.pkl) to use JSON to read and save functions (compatible with original pickle) (Thanks @chenxuan353 for pr)
Optimize some code type annotations (thanks to @chenxuan353 for providing pr)
Search extension (ext_search.py) optimization, prohibiting bots from repeatedly searching and searching for duplicate content in a short time
[2023/3/26] v2.0.4
Fixed the issue of parsing errors when @全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全全
Added extension and update personality support, and added an evolution extension module to allow bots to automatically update personality
Add a prohibited re-reading rule to the response rule
[2023/3/26] v2.0.3 picture output support
To output content to picture: Use htmlrender to convert TA's reply to picture to reduce risk control chance (optional switch, thanks to @HMScygnet for providing pr)
Wait for OpenAI to switch personality presets during response or stop processing messages after the response timeout (Thanks to @Misaka-Mikoto-Tech for pr)
Correct the logic of editing and deleting presets to determine whether they are locked and whether they are default presets and the presets being used (thanks to @Misaka-Mikoto-Tech for pr)
Add pre-checking support for interrupting response when calling extensions, optimize the execution effect of search extensions, and avoid the situation where bots can make up for search results by themselves.
Fixed some command help information errors
Fixed encoding problem when installing extensions through commands
Correct the pure symbol filtering judgment logic
[2023/3/21] v2.0.2 Extended download command support
When switching personality, the chat output is changed to non-DEBUG mode and will also be sent.
Added extension installation/removal directives to get the latest extensions directly from GitHub
Simplified console output in non-DEBUG mode
[2023/3/20] v2.0.1 VIOCEVOX Voice Extension
Fixed -global Global's control permissions and logic (thanks to @Misaka-Mikoto-Tech for pr)
Added a new voice extension ext_VOICEVOX to enable local deployment more conveniently (thanks to @六Ruyuzhi for providing technical support)
Fixed the blank line problem at the beginning and end of the reply content; fixed the problem that the short pure symbol reply content was not filtered normally
Fixed the permission settings for private chat sessions
[2023/3/18] v2.0.0 project reconstruction?
❗◝ Note: This update requires deleting the original bot memory file to be regenerated (i.e. ./data/naturel_gpt folder), otherwise unpredictable errors may occur. It is recommended to delete and regenerate the configuration file together; this operation will lose all edited personality presets. If you need to continue using it after the update, please use rg query to query and save the presets, and import them manually after the update!
The project is completely refactored. Thanks to @Misaka-Mikoto-Tech for its strong support. Almost all data management and code logic have been rewritten, and the code quality has been significantly improved.
The conversation personality preset set is completely independent of each other, and each session can be edited separately without affecting each other.
Instruction table rewrite, most instructions provide -global option to support editing all session settings and -target specified session remote control operations. The new instruction table is more complete, and it may be used as an API interface to combine front-end page to realize plug-in management visualization.
The lock / unlock command is modified to whether to enable automatic personality switching. After lock, inactive personality will no longer be automatically awakened.
The chat message record is divided into session units, rather than personality, which means that each personality may see speech information from other personalities, and its context comprehension ability is enhanced. If you enable unlock personality switching, you can also experience the feeling of "hosting a meeting".
Increase the time perception of all messages in chat
bot changes the user's nickname from the QQ nickname to the group business card nickname, and adds the nickname to obtain the notification of new members joining the group.
@message segment parsing resets to more reasonable logic instead of directly removing @message segment
Fixed the issue that the problem that cannot be responded normally if NG_ENABLE_MSG_SPLIT is false (thanks to @HyPerP for pr)
Optimize debug output, change to debug hierarchical mode, save the propt output to the log
Lots of detailed modifications and bug fixes
[2023/3/9] v1.5.3 timing support
Filter out pure symbolic short messages from messages sent by bot
Fixed bug where the amnestics command did not work properly
Added a timer extension and provided related support
Voice synthesis extension provides access to Tencent Translation API (optional switch) (Thanks to @tonato-01 for pr)
Fixed the question of bots bringing their own personal names when answering in some cases
Fixed the limit on plugin calls not taking effect
Optimize segmentation problem when bot calls extension
Fixed the problem of editing instructions in memory management
Text matching rules for optimizing memory enhancement function
[2023/3/5] v1.5.0 memory module update
Added bot memory management capabilities support and memory management related instructions, allowing bot to actively remember/forgot information, and automatically enhance memory information to extend the effective memory time as much as possible.
Two new active memory management extensions (memory and forgetting modules, recommended for combination)
According to the characteristics of the GPT3.5 dialogue model, the prompt was rewritten to improve the bot's recognition rate of extended instructions
[2023/3/3] v1.4.4 Mail extension
Fixed the issue that could not be read after modifying the configuration file directory (thanks to @he0119 for pr)
The implementation of the get response will be put into the thread pool to reduce the request timeout and get stuck (thanks to @he0119 for pr)
Added bot's session management permissions for group chat administrators (thanks to @HMScygnet for providing pr)
Optimize multi-segment reply preprocessing to reduce the frequency of automatically writing out subsequent unrelated conversations
Adjust the command to generate matching rules, slightly relaxing the standardization of bot calls extensions
The http protocol header will be automatically supplemented when updating the proxy server.
Optimize dialogue prompts prompts to improve reply quality
Added a send email extension
[2023/3/3] v1.4.3
Disable branching of tokenizer of huggingface to avoid deadlock problems
[2023/3/3] v1.4.2
Fixed the issue that the ChatGPT model request time is too long and will not timeout. Provide a configuration item that can specify the timeout time by yourself.
Added a configuration option that controls whether to log reference to non-bot related message contexts
Added more intuitive tips to several common error reports
Fixed an issue where an extension module called error
Adjust the propt and optimize the bot reply quality
[2023/3/2] v1.4.1
Fix a Prompt description error
Fixed a bug where the dialogue was too long and dead
[2023/3/2] v1.4.0 ChatGpt Model Update
After this update, you need to update the OpenAi SDK to version 0.27.0 or above to use the ChatGPT series model
Added support for ChatGPT series models and optimized propt settings for their features
Add configuration items that can be closed by automatically welcome new members
Optimized the logic of segmented output of chat content
Fixed a bug that caused a single chat message to get stuck in a loop
Fix proxy server configuration exception (thanks to @HMScygnet for the repair code)
[2023/3/1] v1.3.7 Frugality | Agent Service Update
Optimize the generation of propt, adding optional switches to summarize the chat memory function, which can reduce token consumption by about 30% after turning off (after feedback, this function has limited applicability in many scenarios, and overall high cost and low return, so optional off is added, and the user impression summary remains on)
Added extension module to pass information, which can obtain original request trigger information, reply information, and bot preset names, which facilitates more complex expansion requirements.
Added the function of automatically welcome new members to the group
Add proxy server configuration
[2023/2/25] v1.3.6
Fixed an error in rg set instruction
[2023/2/24] v1.3.5 Blacklist | Directive Update
Fixed an issue where occasional errors caused by irregular wake word setting types
Fixed the issue of failing to create automatic data folder directory for the first time
Added batch operations to change personality presets - -all commands (only available to administrators)
Added chats directive to view all session status
Optimize README.md documentation
Added configuration item to whether to enable message splitting and sending multiple messages (default is enabled)
Added blacklisting function, user messages in blacklist will not be recorded and responded
Optimize the reply quality of bot when the extension module is not enabled, reducing the situation of virtual conditioner expansion
Optimize dialogue generation propt, enhancing the ability of bots to send multiple chats
Increased bot's ability to perceive current time
Remove the wrong call instructions from the bot's speech record to avoid the bot's repeated learning of the wrong extension instructions
Change the propt generated by most text to English description to minimize some tokens consumption
Added a new emoticon package extension module
[2023/2/19] v1.3.2
Fixed the issue where setting disable extensions in yaml configuration does not take effect
Continuously optimize dialogue generation propts, improving bot's ability to understand and use extensions
Added the -all option to enable/close session instructions, which can enable/close all sessions at once
[2023/2/19] v1.3.1
Optimize parameter transfer of extension modules
Modified some extension plug-in tips to make it easier for bot to understand how to use extensions
[2023/2/18] v1.3.0 extension module function update
*Extension support: Added plug-in extension support (plugin for plug-in?), supports custom extensions in natural language, and provides two example extensions
Multiple details optimization
[2023/2/16] v1.2.0 asynchronous update
This update has added asynchronous capabilities and the functions may not be stable. If you want to continue using the old version of the memory file, please make a backup
Asynchronous update: bot's reply generation starts to support asynchronous requests, improving message processing speed
Remove the stop word limit of double carriage return characters, optimize the output ability of ai to long text
Optimize error output, error message will be displayed on the console for troubleshooting when an API request error occurs.
Optimize memory logic, bot will not store error prompt information in memory when requesting text errors.
[2023/2/12] v1.1.6
Added the switch function to whether to switch the session or not
Added memory reset function to specify reset all or specific personality of the current session
Supports custom configuration for message interception and message processing priority
Simplify the output of help commands, separate the help information of administrator commands into rg admin
[2023/2/9] v1.1.5 Wake Word | Updated function of blocking Word
Fixed the issue of calling the bot command before the conversation was not created
Added the function of custom trigger word wake-up
Added the function of custom blocking words to reject reply
Added bot random participation chat function, you can choose to enable it
Optimize the chat propt generation logic for information when manually @bot , making bot reply more directive
Optimize the configuration file management logic, and continue to use the original configuration file after update. After the program is loaded, the configuration file fields will be automatically updated.
[2023/2/6] v1.1.4
Note: This update requires deletion of the original bot memory file and regenerate it (i.e. ./data/naturel_gpt folder), otherwise unpredictable errors may occur.
Fixed the problem of bot memory string lines (memory chaos in the scenarios of multiple groups being used simultaneously)
Optimize the logic of bots to generate memory and impression summary, improving the speed of bot responses
Optimized console output
[2023/2/5] v1.1.2
Added lock/unlock function of personality preset, which cannot be edited by non-administrators after locking.
Update README documentation
Optimize the display format of rg command
Fine-tuned some default parameters in config.py
Fixed the problem that this plug-in intercepts the response of other plug-ins, reducing the response priority of this plug-in
Updated the communication group information (see the beginning of this document). All the big guys are welcome to join us to learn from each other, discuss update directions, share more gameplay, etc.
[2023/2/2] v1.1.1
Fixed the problem of inquiring personality errors
[2023/2/2] v1.1.0
Note: This update requires deletion of the original bot memory file and regenerate it (i.e. ./data/naturel_gpt folder), otherwise unpredictable errors may occur.
Added preset editing function
Added a custom administrator id function, administrators can delete presets/modify locked presets
Add debug switch to control console output when generating text (default off)
? Contribution list
Thanks to the following developers for their contribution to this project