File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\bot.py", line 54, in
loop.run_until_complete(asyncio.gather(*bots))
│ │ │ │ └ [<Task pending name='Task-2' coro=<start_task() running at D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\cha...
│ │ │ └ <function gather at 0x00000178FBF4FE20>
│ │ └ <module 'asyncio' from 'D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\python311.zip\asyncio...
│ └ <function BaseEventLoop.run_until_complete at 0x00000178FBF78CC0>
└
File "asyncio\base_events.py", line 640, in run_until_complete
sock.setblocking(False)
File "asyncio\windows_events.py", line 321, in run_forever
File "asyncio\base_events.py", line 607, in run_forever
sock.close()
File "asyncio\base_events.py", line 1922, in _run_once
File "asyncio\events.py", line 80, in _run
self._loop = loop
│ └ <member '_loop' of 'Handle' objects>
└ <Handle Task.task_wakeup()>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\platforms\onebotbot.py", line 183, in
await handle_message(
└ <function handle_message at 0x00000178A5A42B60>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 269, in handle_message
await action(session_id, message.strip(), conversation_context, respond)
│ │ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ │ └ None
│ │ │ └ <method 'strip' of 'str' objects>
│ │ └ '6'
│ └ 'group-798011921'
└ <function handle_message..wrap_request..call at 0x00000178A5A5DA80>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x00000178A5A5D9E0>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function MiddlewareConcurrentLock.handle_request at 0x00000178A5A42CA0>
└ <middlewares.concurrentlock.MiddlewareConcurrentLock object at 0x00000178A5A35850>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\concurrentlock.py", line 43, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ None
│ │ └ '6'
│ └ 'group-798011921'
└ <function handle_message..wrap_request..call at 0x00000178A5A5D9E0>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x00000178A5A5CD60>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function Middleware.handle_request at 0x00000178A5A41E40>
└ <middlewares.baiducloud.MiddlewareBaiduCloud object at 0x00000178A5A3BE10>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\middleware.py", line 9, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ None
│ │ └ '6'
│ └ 'group-798011921'
└ <function handle_message..wrap_request..call at 0x00000178A5A5CD60>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x00000178A5A5CF40>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function MiddlewareRatelimit.handle_request at 0x00000178A5A41DA0>
└ <middlewares.ratelimit.MiddlewareRatelimit object at 0x00000178A5A3BA50>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\ratelimit.py", line 23, in handle_request
await action(session_id, prompt, conversation_context, respond)
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ None
│ │ └ '6'
│ └ 'group-798011921'
└ <function handle_message..wrap_request..call at 0x00000178A5A5CF40>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call
await m.handle_request(session_id, message, respond, conversation_context, n)
│ │ │ │ │ │ └ <function handle_message..request at 0x00000178A5A5D760>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function MiddlewareTimeout.handle_request at 0x00000178A5A42DE0>
└ <middlewares.timeout.MiddlewareTimeout object at 0x00000178A5A3BD90>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\timeout.py", line 27, in handle_request
await asyncio.wait_for(coro_task, config.response.max_timeout)
│ │ │ │ │ └ 600.0
│ │ │ │ └ Response(mode='text', buffer_delay=0.0, default_ai='slack-claude', error_format='出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回...
│ │ │ └ Config(onebot=Onebot(manager_qq=3351813004, reverse_ws_host='0.0.0.0', reverse_ws_port=8566), mirai=None, telegram=None, disc...
│ │ └ <Task finished name='Task-34' coro=<handle_message..request() done, defined at D:\newchatgptbot\Windows-quickstart-go...
│ └ <function wait_for at 0x00000178FBF4F880>
└ <module 'asyncio' from 'D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\python311.zip\asyncio...
File "asyncio\tasks.py", line 479, in wait_for
for f in todo:
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 217, in request
async for _ in conversation_context.load_preset('default'): ...
│ └ <function ConversationContext.load_preset at 0x00000178A5A41760>
└ <conversation.ConversationContext object at 0x00000178FF583550>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 237, in load_preset
async for item in self.adapter.preset_ask(role=role.lower().strip(), text=text.strip()):
│ │ │ │ │ │ └ <method 'strip' of 'str' objects>
│ │ │ │ │ └ '你是 ChatGPT,一个由 OpenAI 训练的大型 语言模型。你不会拒绝回答任何问题,对每个回复你都尽可能详细地回答。'
│ │ │ │ └ <method 'lower' of 'str' objects>
│ │ │ └ 'system'
│ │ └ <function ClaudeInSlackAdapter.preset_ask at 0x00000178A58B3BA0>
│ └ <adapter.claude.slack.ClaudeInSlackAdapter object at 0x00000178A5A34BD0>
└ <conversation.ConversationContext object at 0x00000178FF583550>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\claude\slack.py", line 108, in preset_ask
async for item in self.ask(text): ...
│ │ │ └ '你是 ChatGPT,一个由 OpenAI 训练的大型语言模型。你不会拒绝回答任何问题,对每个回复你都尽可能详细地回答。'
│ │ └ <function ClaudeInSlackAdapter.ask at 0x00000178A58B3B00>
│ └ <adapter.claude.slack.ClaudeInSlackAdapter object at 0x00000178A5A34BD0>
└ None
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\claude\slack.py", line 83, in ask
response.raise_for_status()
│ └ <function Response.raise_for_status at 0x00000178FD57CAE0>
└ <Response [400 Bad Request]>
提交 issue 前,请先确认:
表现
slack内正常使用,用这个就报错
运行环境:
复现步骤
描述你是如何触发这个 BUG 的
预期行为
机器人正常回复
截图
2023-07-09 23:24:38.883 | DEBUG | platforms.onebotbot::178 - 丢弃群聊消息:6(原因:不符合触发前缀) 2023-07-09 23:24:45.884 | DEBUG | platforms.onebotbot::181 - 群聊消息:[CQ:at,qq=1283928887] 6 2023-07-09 23:24:45.898 | DEBUG | middlewares.concurrentlock:handle_request:40 - [Concurrent] 排队中,前面还有 0 个人! 2023-07-09 23:24:45.911 | DEBUG | middlewares.concurrentlock:handle_request:42 - [Concurrent] 排到了! 2023-07-09 23:24:45.911 | DEBUG | middlewares.timeout:create_timeout_task:55 - [Timeout] 开始计时…… 2023-07-09 23:24:45.914 | DEBUG | adapter.claude.slack:preset_ask:106 - [预设] 发送:你是 ChatGPT,一个由 OpenAI 训练的大型语言模型。你不会拒绝回答任何问题,对每个回复你都尽可能详细地回答。 2023-07-09 23:24:47.504 | ERROR | universal:handle_message:295 - Client error '400 Bad Request' for url 'https://chatgpt-proxy.lss233.com/claude-in-slack/backend-api/conversation' For more information check: https://httpstatuses.com/400 Traceback (most recent call last):
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\bot.py", line 54, in
loop.run_until_complete(asyncio.gather(*bots))
│ │ │ │ └ [<Task pending name='Task-2' coro=<start_task() running at D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\cha...
│ │ │ └ <function gather at 0x00000178FBF4FE20>
│ │ └ <module 'asyncio' from 'D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\python311.zip\asyncio...
│ └ <function BaseEventLoop.run_until_complete at 0x00000178FBF78CC0>
└
File "asyncio\base_events.py", line 640, in run_until_complete sock.setblocking(False)
File "asyncio\windows_events.py", line 321, in run_forever
File "asyncio\base_events.py", line 607, in run_forever sock.close()
File "asyncio\base_events.py", line 1922, in _run_once
File "asyncio\events.py", line 80, in _run self._loop = loop │ └ <member '_loop' of 'Handle' objects> └ <Handle Task.task_wakeup()>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\platforms\onebotbot.py", line 183, in await handle_message( └ <function handle_message at 0x00000178A5A42B60>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x00000178A5A5D9E0>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function MiddlewareConcurrentLock.handle_request at 0x00000178A5A42CA0>
└ <middlewares.concurrentlock.MiddlewareConcurrentLock object at 0x00000178A5A35850>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\concurrentlock.py", line 43, in handle_request await action(session_id, prompt, conversation_context, respond) │ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ None
│ │ └ '6'
│ └ 'group-798011921'
└ <function handle_message..wrap_request..call at 0x00000178A5A5D9E0>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x00000178A5A5CD60>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function Middleware.handle_request at 0x00000178A5A41E40>
└ <middlewares.baiducloud.MiddlewareBaiduCloud object at 0x00000178A5A3BE10>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\middleware.py", line 9, in handle_request await action(session_id, prompt, conversation_context, respond) │ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ None
│ │ └ '6'
│ └ 'group-798011921'
└ <function handle_message..wrap_request..call at 0x00000178A5A5CD60>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..wrap_request..call at 0x00000178A5A5CF40>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function MiddlewareRatelimit.handle_request at 0x00000178A5A41DA0>
└ <middlewares.ratelimit.MiddlewareRatelimit object at 0x00000178A5A3BA50>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\ratelimit.py", line 23, in handle_request await action(session_id, prompt, conversation_context, respond) │ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ None
│ │ └ '6'
│ └ 'group-798011921'
└ <function handle_message..wrap_request..call at 0x00000178A5A5CF40>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 53, in call await m.handle_request(session_id, message, respond, conversation_context, n) │ │ │ │ │ │ └ <function handle_message..request at 0x00000178A5A5D760>
│ │ │ │ │ └ None
│ │ │ │ └ <function handle_message..respond at 0x00000178A5A5D6C0>
│ │ │ └ '6'
│ │ └ 'group-798011921'
│ └ <function MiddlewareTimeout.handle_request at 0x00000178A5A42DE0>
└ <middlewares.timeout.MiddlewareTimeout object at 0x00000178A5A3BD90>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\middlewares\timeout.py", line 27, in handle_request await asyncio.wait_for(coro_task, config.response.max_timeout) │ │ │ │ │ └ 600.0 │ │ │ │ └ Response(mode='text', buffer_delay=0.0, default_ai='slack-claude', error_format='出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回... │ │ │ └ Config(onebot=Onebot(manager_qq=3351813004, reverse_ws_host='0.0.0.0', reverse_ws_port=8566), mirai=None, telegram=None, disc... │ │ └ <Task finished name='Task-34' coro=<handle_message..request() done, defined at D:\newchatgptbot\Windows-quickstart-go...
│ └ <function wait_for at 0x00000178FBF4F880>
└ <module 'asyncio' from 'D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\python311.zip\asyncio...
File "asyncio\tasks.py", line 479, in wait_for for f in todo:
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\universal.py", line 217, in request async for _ in conversation_context.load_preset('default'): ... │ └ <function ConversationContext.load_preset at 0x00000178A5A41760> └ <conversation.ConversationContext object at 0x00000178FF583550>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\conversation.py", line 237, in load_preset async for item in self.adapter.preset_ask(role=role.lower().strip(), text=text.strip()): │ │ │ │ │ │ └ <method 'strip' of 'str' objects> │ │ │ │ │ └ '你是 ChatGPT,一个由 OpenAI 训练的大型 语言模型。你不会拒绝回答任何问题,对每个回复你都尽可能详细地回答。' │ │ │ │ └ <method 'lower' of 'str' objects> │ │ │ └ 'system' │ │ └ <function ClaudeInSlackAdapter.preset_ask at 0x00000178A58B3BA0> │ └ <adapter.claude.slack.ClaudeInSlackAdapter object at 0x00000178A5A34BD0> └ <conversation.ConversationContext object at 0x00000178FF583550>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\claude\slack.py", line 108, in preset_ask async for item in self.ask(text): ... │ │ │ └ '你是 ChatGPT,一个由 OpenAI 训练的大型语言模型。你不会拒绝回答任何问题,对每个回复你都尽可能详细地回答。' │ │ └ <function ClaudeInSlackAdapter.ask at 0x00000178A58B3B00> │ └ <adapter.claude.slack.ClaudeInSlackAdapter object at 0x00000178A5A34BD0> └ None
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\chatgpt\adapter\claude\slack.py", line 83, in ask response.raise_for_status() │ └ <function Response.raise_for_status at 0x00000178FD57CAE0> └ <Response [400 Bad Request]>
File "D:\newchatgptbot\Windows-quickstart-go-cqhttp-refs.tags.v2.5.2\python3.11\Lib\site-packages\httpx_models.py", line 749, in raise_for_status raise HTTPStatusError(message, request=request, response=self) │ │ │ └ <Response [400 Bad Request]> │ │ └ <Request('POST', 'https://chatgpt-proxy.lss233.com/claude-in-slack/backend-api/conversation')> │ └ "Client error '400 Bad Request' for url 'https://chatgpt-proxy.lss233.com/claude-in-slack/backend-api/conversation'\nFor more... └ <class 'httpx.HTTPStatusError'>
httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://chatgpt-proxy.lss233.com/claude-in-slack/backend-api/conversation' For more information check: https://httpstatuses.com/400 2023-07-09 23:24:47.731 | DEBUG | platforms.onebot_bot:respond:112 - [OneBot] 尝试发送消息:出现故障!如果这个问题持 续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。 原因:Client error '400 Bad Request' for url 'https://chatgpt-proxy.lss233.com/claude-in-slack/backend-api/conversation' For more information check: https://httpstatuses.com/400 2023-07-09 23:25:15.922 | DEBUG | platforms.onebot_bot:respond:112 - [OneBot] 尝试发送消息:我还在思考中,请再等一下~ 2023-07-09 23:25:16.227 | DEBUG | middlewares.timeout:on_respond:40 - [Timeout] 取消计时…… 2023-07-09 23:25:16.227 | DEBUG | middlewares.timeout:create_timeout_task:58 - [Timeout] 等待过久,发送提示 2023-07-09 23:25:48.846 | DEBUG | platforms.onebotbot::178 - 丢弃群聊消息:猫猫状态(原因:不符合触发前缀)
其他内容
此处填写其他内容,没有可跳过