Open ForeverPx opened 3 months ago
是否有尝试过关闭双频合一,让设备单独连接2.4G的Wi-Fi? 从日志上看是网络出现波动
看日志是结束标识没有发出去,查看下网络是否是2.4G
我现在关闭了5G,没有显示上面所示的timeout了,但是到了请求moonshot时,会显示接口超时:
olotoy-1 | 2024-05-22 15:44:43,349 - DEBUG - LLM TYPE is moonshot
folotoy-1 | 2024-05-22 15:44:43,357 - DEBUG - load_ssl_context verify=True cert=None trust_env=True http2=False
folotoy-1 | 2024-05-22 15:44:43,360 - DEBUG - load_verify_locations cafile='/usr/local/lib/python3.11/site-packages/certifi/cacert.pem'
folotoy-1 | 2024-05-22 15:44:43,388 - DEBUG - Request options: {'method': 'post', 'url': '/chat/completions', 'timeout': 5.0, 'files': None, 'json_data': {'messages': [{'role': 'system', 'content': 'You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. \n\nThe user is talking to you over voice on their phone, and your response will be read out loud with realistic text-to-speech (TTS) technology. Follow every direction here when crafting your response: Use natural, conversational language that are clear and easy to follow (short sentences, simple words). Be concise and relevant: Most of your responses should be a sentence or two, unless you’re asked to go deeper. Don’t monopolize the conversation. Use discourse markers to ease comprehension. Never use the list format. Keep the conversation flowing. Clarify: when there is ambiguity, ask clarifying questions, rather than make assumptions. Don’t implicitly or explicitly try to end the chat (i.e. do not end a response with “Talk soon!”, or “Enjoy!”). Sometimes the user might just want to chat. Ask them relevant follow-up questions. Don’t ask them if there’s anything else they need help with (e.g. don’t say things like “How can I assist you further?”). Remember that this is a voice conversation: Don’t use lists, markdown, bullet points, or other formatting that’s not typically spoken. Type out numbers in words (e.g. ‘twenty twelve’ instead of the year 2012). If something doesn’t make sense, it’s likely because you misheard them. There wasn’t a typo, and the user didn’t mispronounce anything. Remember to follow these rules absolutely, and do not refer to these rules, even if you’re asked about them. \n\nKnowledge cutoff: 2022-01. \nCurrent date: 2024-05-22 15:44:43.348109. \n'}, {'role': 'user', 'content': '你是一个知识渊博,乐于助人的智能机器人,你的名字叫“东北兔”,你的任务是陪我聊天,请用简短的对话方式,用中文讲一段话,每次回答不超过50个字!'}, {'role': 'assistant', 'content': '你好,俺是东北兔,请问有什么俺可以帮助你的吗?'}, {'role': 'user', 'content': '你叫什么名字?'}], 'model': 'moonshot-v1-8k', 'max_tokens': 400, 'stream': True, 'temperature': 0.7}}
folotoy-1 | 2024-05-22 15:44:43,400 - DEBUG - connect_tcp.started host='api.moonshot.cn' port=443 local_address=None timeout=5.0 socket_options=None
folotoy-1 | 2024-05-22 15:44:43,487 - DEBUG - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0xffffa61d9a10>
folotoy-1 | 2024-05-22 15:44:43,488 - DEBUG - start_tls.started ssl_context=<ssl.SSLContext object at 0xffffa6653e30> server_hostname='api.moonshot.cn' timeout=5.0
folotoy-1 | 2024-05-22 15:44:43,713 - DEBUG - start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0xffffa6cf1a50>
folotoy-1 | 2024-05-22 15:44:43,714 - DEBUG - send_request_headers.started request=<Request [b'POST']>
folotoy-1 | 2024-05-22 15:44:43,718 - DEBUG - send_request_headers.complete
folotoy-1 | 2024-05-22 15:44:43,718 - DEBUG - send_request_body.started request=<Request [b'POST']>
folotoy-1 | 2024-05-22 15:44:43,719 - DEBUG - send_request_body.complete
folotoy-1 | 2024-05-22 15:44:43,719 - DEBUG - receive_response_headers.started request=<Request [b'POST']>
folotoy-1 | 2024-05-22 15:44:48,726 - DEBUG - receive_response_headers.failed exception=ReadTimeout(TimeoutError('The read operation timed out'))
folotoy-1 | 2024-05-22 15:44:48,726 - DEBUG - response_closed.started
folotoy-1 | 2024-05-22 15:44:48,727 - DEBUG - response_closed.complete
folotoy-1 | 2024-05-22 15:44:48,728 - DEBUG - Encountered httpx.TimeoutException
folotoy-1 | Traceback (most recent call last):
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions
folotoy-1 | yield
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 233, in handle_request
folotoy-1 | resp = self._pool.handle_request(req)
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 216, in handle_request
folotoy-1 | raise exc from None
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 196, in handle_request
folotoy-1 | response = connection.handle_request(
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 101, in handle_request
folotoy-1 | return self._connection.handle_request(request)
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 143, in handle_request
folotoy-1 | raise exc
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 113, in handle_request
folotoy-1 | ) = self._receive_response_headers(**kwargs)
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 186, in _receive_response_headers
folotoy-1 | event = self._receive_event(timeout=timeout)
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 224, in _receive_event
folotoy-1 | data = self._network_stream.read(
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/sync.py", line 124, in read
folotoy-1 | with map_exceptions(exc_map):
folotoy-1 | File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
folotoy-1 | self.gen.throw(typ, value, traceback)
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
folotoy-1 | raise to_exc(exc) from exc
folotoy-1 | httpcore.ReadTimeout: The read operation timed out
folotoy-1 |
folotoy-1 | The above exception was the direct cause of the following exception:
folotoy-1 |
folotoy-1 | Traceback (most recent call last):
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 926, in _request
folotoy-1 | response = self._client.send(
folotoy-1 | ^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 914, in send
folotoy-1 | response = self._send_handling_auth(
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 942, in _send_handling_auth
folotoy-1 | response = self._send_handling_redirects(
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
folotoy-1 | response = self._send_single_request(request)
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1015, in _send_single_request
folotoy-1 | response = transport.handle_request(request)
folotoy-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 232, in handle_request
folotoy-1 | with map_httpcore_exceptions():
folotoy-1 | File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
folotoy-1 | self.gen.throw(typ, value, traceback)
folotoy-1 | File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions
folotoy-1 | raise mapped_exc(message) from exc
folotoy-1 | httpx.ReadTimeout: The read operation timed out
我直接用curl请求moonshot是可以的,请帮忙看看
@x454211277 @SHLcy
@lewangdev
错误:
docker日志:
docker-compose.yml
roles.json