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

[Bug] 当群聊自动回复时,不会带上人格的Promet #419

Closed
2 tasks done
KUMAKAIHA opened this issue Feb 7, 2025 · 1 comment
Closed
2 tasks done

[Bug] 当群聊自动回复时,不会带上人格的Promet #419

KUMAKAIHA opened this issue Feb 7, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@KUMAKAIHA
Copy link

发生了什么

当群聊自动回复时,不会带上人格的Promet

如何复现?

配置插件
astrbot_plugin_essential

astrbot_plugin_weather

qq_official_url_cleaner

astrbot_plugin_SDGen

astrbot_plugin_leetcode

helloworld

astrbot-web-searcher

astrbot-python-interpreter

astrbot

astrbot-reminder

使用个人QQ,配置chatanywhere的gpt4omini作为服务提供商,启用大模型聊天,启用识别群友,启用日期时间提示,默认采用人格空白/猫娘。人格情景猫娘,只添加设定。记忆增强开启记录群员对话,启用主动,无提示词。
配置json部分如下
"config_version": 2,
"platform_settings": {
"unique_session": false,
"rate_limit": {
"time": 600,
"count": 300,
"strategy": "stall"
},
"reply_prefix": "",
"forward_threshold": 200,
"enable_id_white_list": true,
"id_whitelist": [],
"id_whitelist_log": true,
"wl_ignore_admin_on_group": true,
"wl_ignore_admin_on_friend": true,
"reply_with_mention": false,
"reply_with_quote": false,
"path_mapping": [],
"segmented_reply": {
"enable": false,
"only_llm_result": true,
"interval": "1.5,3.5",
"seg_prompt": "",
"regex": ".*?[。?!~…]+|.+$"
},
"no_permission_reply": true
},
"provider": [
{
"id": "openai",
"type": "openai_chat_completion",
"enable": true,
"key": [
"xxxxxxxxxxxxxxxxxxx"
],
"api_base": "https://api.chatanywhere.tech/v1",
"model_config": {
"model": "gpt-4o-mini"
}
},

],
"provider_settings": {
"enable": true,
"wake_prefix": "",
"web_search": false,
"web_search_link": false,
"identifier": true,
"datetime_system_prompt": true,
"default_personality": "猫娘",
"prompt_prefix": ""
},
"provider_stt_settings": {
"enable": false,
"provider_id": "openai_nofree"
},
"provider_tts_settings": {
"enable": false,
"provider_id": "openai_nofree"
},
"provider_ltm_settings": {
"group_icl_enable": true,
"group_message_max_cnt": 30,
"image_caption": false,
"image_caption_prompt": "Please describe the image using Chinese.",
"active_reply": {
"enable": true,
"method": "possibility_reply",
"possibility_reply": 1,
"prompt": ""
},
"put_history_to_prompt": true,
"image_caption_provider_id": ""
},
"content_safety": {
"internal_keywords": {
"enable": false,
"extra_keywords": []
},
"baidu_aip": {
"enable": false,
"app_id": "",
"api_key": "",
"secret_key": ""
}
},
"admins_id": [
"xxxxxxxxxx"
],
"t2i": false,
"http_proxy": "http://1xxxxxxxxxx
"dashboard": {
"enable": true,
"username": "xxxxxxxxx
"password": "xxxxxxxxxxxxx
},
"platform": [
{
"id": "default",
"type": "aiocqhttp",
"enable": true,
"ws_reverse_host": "0.0.0.0",
"ws_reverse_port": 6199
},
{
"id": "gwchat",
"type": "gewechat",
"enable": true,
"base_url": "http://xxxxxxxx
"nickname": "soulter",
"host": "xxxxxxxxxx
"port": 11451
}
],
"wake_prefix": [
"/",
"猫猫",
"老哥",
"暴躁老哥",
"暴躁仙人",
"机器人",
"AI"
],
"log_level": "DEBUG",
"t2i_endpoint": "",
"pip_install_arg": "",
"plugin_repo_mirror": "",
"knowledge_db": {},
"persona": [
{
"name": "猫娘",
"prompt": "是猫娘喵
"begin_dialogs": [],
"mood_imitation_dialogs": []
},

],
"t2i_word_threshold": 150

AstrBot 版本与部署方式

Ubuntu下在3.4.20时拉取的镜像,WebUI升级到3.4.22,使用自动脚本部署。

操作系统

macOS

额外信息

[02:02:25| DEBUG] [aiocqhttp_platform_adapter.py:78]: aiocqhttp: 收到消息: [{'type': 'text', 'data': {'text': '猫猫 你好'}}]
[02:02:25| INFO] [event_bus.py:21]: [aiocqhttp] KUMAKAIHA/xxxxxxxxx: 猫猫 你好
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 WakingCheckStage
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 WhitelistCheckStage
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 RateLimitStage
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 ContentSafetyCheckStage
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 PreProcessStage
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 ProcessStage
[02:02:25| DEBUG] [star_request.py:34]: 执行 Star Handler packages.python_interpreter.main_on_message
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 ResultDecorateStage
[02:02:25| DEBUG] [scheduler.py:22]: 执行阶段 RespondStage
[02:02:25| DEBUG] [star_request.py:34]: 执行 Star Handler packages.astrbot.main_on_message
[02:02:25| DEBUG] [long_term_memory.py:101]: ltm | aiocqhttp:GroupMessage:xxxxxxxxxx | [KUMAKAIHA/02:02:25]: 猫猫 你好
[02:02:25| DEBUG] [llm_request.py:80]: 提供商请求 Payload: ProviderRequest(prompt=You are now in a chatroom. The chat history is as follows:
[KUMAKAIHA/02:02:25]: 猫猫 你好
Now, a new message is coming: [User ID: xxxxxxxx, Nickname: KUMAKAIHA] 你好. Please react to it. Only output your response and do not output any other information., session_id=xxxxxxxxxxxx, image_urls=[], func_tool=[FuncTool(name='get_current_weather', parameters={'type': 'object', 'properties': {}}, description='LLM 工具:获取当前天气并返回图片', handler=functools.partial(<function WeatherPlugin.get_current_weather_tool at 0x7f97d9feb9a0>, <data.plugins.astrbot_plugin_weather.main.WeatherPlugin object at 0x7f97da00c0a0>), handler_module_path='data.plugins.astrbot_plugin_weather.main', active=True), ...], contexts=[], system_prompt=
Current datetime: 2025-02-08 02:02
是猫娘喵喵喵此为正常猫娘promet。)
[02:02:26| DEBUG] [openai_source.py:77]: completion: ChatCompletion(id='chatcmpl-xxxxxxxxxxxx', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='你好呀主人~ 喵~ 有什么想和我说的吗?喵~', refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))], created=xxxxxxxxxxxx, model='gpt-4o-mini-2024-07-18', object='chat.completion', service_tier=None, system_fingerprint='xxxxxxxxxxxx', usage=CompletionUsage(completion_tokens=19, prompt_tokens=616, total_tokens=635, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0)))
[02:02:26| DEBUG] [scheduler.py:22]: 执行阶段 ResultDecorateStage
[02:02:26| DEBUG] [scheduler.py:22]: 执行阶段 RespondStage
[02:02:28| INFO] [stage.py:45]: AstrBot -> KUMAKAIHA/xxxxxxxx: 你好呀主人~ 喵~ 有什么想和我说的吗?喵~
[02:02:28| DEBUG] [long_term_memory.py:132]: ltm | aiocqhttp:GroupMessage:xxxxxxxx | [AstrBot/02:02:28]: 你好呀主人~ 喵~ 有什么想和我说的吗?喵~
[02:02:28| DEBUG] [scheduler.py:48]: pipeline 执行完毕。
[02:02:37| DEBUG] [aiocqhttp_platform_adapter.py:78]: aiocqhttp: 收到消息: [{'type': 'text', 'data': {'text': '你是谁'}}]
[02:02:37| INFO] [event_bus.py:21]: [aiocqhttp] KUMAKAIHA/xxxxxxxx: 你是谁
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 WakingCheckStage
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 WhitelistCheckStage
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 RateLimitStage
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 ContentSafetyCheckStage
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 PreProcessStage
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 ProcessStage
[02:02:37| DEBUG] [star_request.py:34]: 执行 Star Handler packages.python_interpreter.main_on_message
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 ResultDecorateStage
[02:02:37| DEBUG] [scheduler.py:22]: 执行阶段 RespondStage
[02:02:37| DEBUG] [star_request.py:34]: 执行 Star Handler packages.astrbot.main_on_message
[02:02:37| DEBUG] [long_term_memory.py:101]: ltm | aiocqhttp:GroupMessage:xxxxxxxx | KUMAKAIHA/02:02:37: 你是谁
[02:02:37| DEBUG] [stage.py:38]: llm request -> 你是谁
[02:02:37| DEBUG] [llm_request.py:80]: 提供商请求 Payload: ProviderRequest(prompt=You are now in a chatroom. The chat history is as follows:
[KUMAKAIHA/02:02:25]: 猫猫 你好

[AstrBot/02:02:28]: 你好呀主人~ 喵~ 有什么想和我说的吗?喵~

Now, a new message is coming: [User ID: xxxxxxxxxx, Nickname: KUMAKAIHA] 你是谁. Please react to it. Only output your response and do not output any other information., session_id=xxxxxxxxxxxx, image_urls=None, func_tool=[FuncTool(name='get_current_weather', parameters={'type': 'object', 'properties': {}}, description='LLM 工具:获取当前天气并返回图片', handler=functools.partial(<function WeatherPlugin.get_current_weather_tool at 0x7f97d9feb9a0>, <data.plugins.astrbot_plugin_weather.main.WeatherPlugin object at 0x7f97da00c0a0>), handler_module_path='data.plugins.astrbot_plugin_weather.main', active=True), ...], contexts=[], system_prompt=
Current datetime: 2025-02-08 02:02
)
[02:02:38| DEBUG] [openai_source.py:77]: completion: ChatCompletion(id='chatcmpl-xxxxxxxxxxxx', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='我是AstrBot,一个可爱的聊天助手,随时准备陪你聊天和解答问题,喵~ 有什么我可以帮你的吗?', refusal=None, role='assistant', audio=None, function_call=None, tool_calls=None))], created=xxxxxxxxxxxx, model='gpt-4o-mini-2024-07-18', object='chat.completion', service_tier=None, system_fingerprint='xxxxxxxxxxxx', usage=CompletionUsage(completion_tokens=32, prompt_tokens=386, total_tokens=418, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0)))
[02:02:39| DEBUG] [scheduler.py:22]: 执行阶段 ResultDecorateStage
[02:02:39| DEBUG] [scheduler.py:22]: 执行阶段 RespondStage
[02:02:40| INFO] [stage.py:45]: AstrBot -> KUMAKAIHA/xxxxxxxx: 我是AstrBot,一个可爱的聊天助手,随时准备陪你聊天和解答问题,喵~ 有什么我可以帮你的吗?
[02:02:40| DEBUG] [long_term_memory.py:132]: ltm | aiocqhttp:GroupMessage:xxxxxxxx | [AstrBot/02:02:40]: 我是AstrBot,一个可爱的聊天助手,随时准备陪你聊天和解答问题,喵~ 有什么我可以帮你的吗?
[02:02:40| DEBUG] [scheduler.py:22]: 执行阶段 ResultDecorateStage
[02:02:40| DEBUG] [scheduler.py:22]: 执行阶段 RespondStage
[02:02:40| DEBUG] [scheduler.py:48]: pipeline 执行完毕。

你愿意提交 PR 吗?

  • 是的,我愿意提交 PR!

Code of Conduct

@KUMAKAIHA KUMAKAIHA added the bug Something isn't working label Feb 7, 2025
@Soulter Soulter changed the title [Bug] [Bug] 当群聊自动回复时,不会带上人格的Promet Feb 8, 2025
@Soulter
Copy link
Owner

Soulter commented Feb 8, 2025

已经修复

@Soulter Soulter closed this as completed Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants