nikissXI / nonebot_plugins

59 stars 14 forks source link

响应结果异常 #29

Closed whopxxx closed 1 year ago

whopxxx commented 1 year ago

大佬,昨天qq被风控了一次后今天gpt就显示响应结果异常,但是接口是正常的,并且gpt官网有发送纪录,但是qq就是不能接收

具体反馈内容如下:

响应结果异常!
响应码: 200
响应内容: data: {"message":
 {"id": "cfa157c6-e994-4144-a6ea-f7feb2e6ddca",
 "author": {"role": "assistant",
 "name": null, 
"metadata": {}},
 "create_time": 1689863645.746383, 
"update_time": null, 
"content": {"content_type": "text", "parts": [""]},
 "status": "in_progress", 
"end_turn": null, 
"weight": 1.0, 
(内容过长已截断)
laiyoi commented 1 year ago

+1,完全相同的情况,反代api浏览器可以打开,域名查出来的ip也可以ping通 顺带提供一下完整的json_data和err_msg变量内容

{'conversation_id': 'd6f045f8-8211-4a77-82c7-835430acb6cb', 'message_id': 'a54f4367-d3e6-46c0-bec4-f5836f684cd9', 'is_completion': True, 'moderation_response': {'flagged': False, 'blocked': False, 'moderation_id': 'modr-7eQOCmX4g2n5984rNSM84rkQDeSVn'}}
data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": [""]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "message_id": "a54f4367-d3e6-46c0-bec4-f5836f684cd9", "is_completion": false, "moderation_response": {"flagged": false, "blocked": false, "moderation_id": "modr-7eQOADVQLRESP0ydstUpxtROqMNXw"}}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry,"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking."]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context or"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context or clarify"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context or clarify your"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context or clarify your question"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context or clarify your question?"]}, "status": "in_progress", "end_turn": null, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context or clarify your question?"]}, "status": "finished_successfully", "end_turn": true, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"message": {"id": "e5331922-e654-4d87-a5a8-3f16ec0cba8e", "author": {"role": "assistant", "name": null, "metadata": {}}, "create_time": 1689868914.854847, "update_time": null, "content": {"content_type": "text", "parts": ["I'm sorry, I don't understand what you are asking. Can you please provide more context or clarify your question?"]}, "status": "finished_successfully", "end_turn": true, "weight": 1.0, "metadata": {"finish_details": {"type": "stop", "stop": "<|diff_marker|>"}, "is_complete": true, "message_type": "next", "model_slug": "text-davinci-002-render-sha"}, "recipient": "all"}, "conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "error": null}

data: {"conversation_id": "d6f045f8-8211-4a77-82c7-835430acb6cb", "message_id": "a54f4367-d3e6-46c0-bec4-f5836f684cd9", "is_completion": true, "moderation_response": {"flagged": false, "blocked": false, "moderation_id": "modr-7eQOCmX4g2n5984rNSM84rkQDeSVn"}}

data: [DONE]
laiyoi commented 1 year ago

这是去掉except Exception as e:部分后的报错

Task exception was never retrieved
future: <Task finished name='req_queue' coro=<req_queue() done, defined at E:\anaconda\envs\nb\lib\site-packages\nonebot_plugin_talk_with_chatgpt\data_handle.py:22> exception=KeyError('message')>
Traceback (most recent call last):
  File "E:\anaconda\envs\nb\lib\site-packages\nonebot_plugin_talk_with_chatgpt\data_handle.py", line 28, in req_queue
    result = await handle_req(q["id"], q["req_text"], q["operation"])
  File "E:\anaconda\envs\nb\lib\site-packages\nonebot_plugin_talk_with_chatgpt\data_handle.py", line 94, in handle_req
    xzx = json_data["message"]["id"]
KeyError: 'message'

应该是api更改了返回内容的格式

Leonado-LEO commented 1 year ago

+1

nikissXI commented 1 year ago

我看看,我今天也翻车了

nikissXI commented 1 year ago

修复了,请更新0.6.2版本

nikissXI commented 1 year ago

@laiyoi @Leonado-LEO @whopxxx 修复了,请更新0.6.2版本