Open YunShengzz opened 4 months ago
openai 改成 volcengine 以下这个手动加上 VOLCENGINE_API_VERSION: v3 VOLCENGINE_MODEL: ep-20240522143915-k7mb7 VOLCENGINE_ACCESS_KEY: AKLTNDRkNzBmYxxxxxxxxxxxxxxxxxxx VOLCENGINE_SECRET_KEY: "Tm1JMFkyUTFaRE5qTm00000000000000000000000000000"
好的好的谢谢 @SHLcy ,第二行的VOLCENGINE_MODEL后面的是固定的对吧
好的好的谢谢 @SHLcy ,第二行的VOLCENGINE_MODEL后面的是固定的对吧
不是的,根据您的model名字填写
好的好的谢谢 @SHLcy ,第二行的VOLCENGINE_MODEL后面的是固定的对吧
不是的,根据您的model名字填写
好的明白了,感谢
好的好的谢谢 @SHLcy ,第二行的VOLCENGINE_MODEL后面的是固定的对吧
不是的,根据您的model名字填写
你好我改后报错了, wo'geng'g我更改的是这样的是模型名字不对吗。 这是我的报错 Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/volcenginesdkarkruntime/_base_client.py", line 448, in _request response.raise_for_status() File "/usr/local/lib/python3.11/site-packages/httpx/_models.py", line 761, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://ark.cn-beijing.volces.com/api/v3/chat/completions' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
日志前后的部分再发一下 完整一点
日志前后的部分再发一下 完整一点
2024-06-21 11:53:46,554 - DEBUG - [Dkey=c82e18658f00] STT(aliyun-asr) request time cost: 0.35s 2024-06-21 11:53:46,554 - INFO - Dkey=c82e18658f00: Transcribed:你好 2024-06-21 11:53:46,554 - DEBUG - Publish topic: /sys/folotoy/c82e18658f00/thing/event/post, msg: {"msgId": 3, "identifier": "recording_transcribed", "inputParams": {"recordingId": 1, "recordingText": "\u4f60\u597d", "recordingUrl": "http://116.62.12.138:8082/recording-93f7ce6777c44e68a876e930a4270d63.wav", "role": 7}} ole': 'assistant', 'content': '我是小科,一个对科学充满热情的小怪才。我相信科学能改变世界,让我们一起探索科学的奥秘,发现那些未知的奇迹吧!'}, {'role': 'user', 'content': '你好'}], 'model': 'Doubao-lite-4k', 'frequency_penalty': None, 'function_call': None, 'functions': None, 'logit_bias': None, 'logprobs': None, 'max_tokens': 800, 'presence_penalty': None, 'stop': None, 'stream': True, 'stream_options': None, 'temperature': 0.7, 'tools': None, 'top_logprobs': None, 'top_p': None, 'user': None}} 2024-06-21 11:53:46,572 - DEBUG - connect_tcp.started host='ark.cn-beijing.volces.com' port=443 local_address=None timeout=5.0 socket_options=None 2024-06-21 11:53:46,619 - DEBUG - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7f68ad1c0e10> 2024-06-21 11:53:46,619 - DEBUG - start_tls.started ssl_context=<ssl.SSLContext object at 0x7f68ae2bcc20> server_hostname='ark.cn-beijing.volces.com' timeout=5.0 2024-06-21 11:53:46,658 - DEBUG - start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7f68aecd06d0> 2024-06-21 11:53:46,658 - DEBUG - send_request_headers.started request=<Request [b'POST']> 2024-06-21 11:53:46,659 - DEBUG - send_request_headers.complete 2024-06-21 11:53:46,659 - DEBUG - send_request_body.started request=<Request [b'POST']> 2024-06-21 11:53:46,659 - DEBUG - send_request_body.complete 2024-06-21 11:53:46,659 - DEBUG - receive_response_headers.started request=<Request [b'POST']> 2024-06-21 11:53:46,698 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 401, b'Unauthorized', [(b'content-type', b'application/json; charset=utf-8'), (b'content-length', b'143'), (b'date', b'Fri, 21 Jun 2024 03:53:46 GMT'), (b'server', b'istio-envoy'), (b'connection', b'close')]) 2024-06-21 11:53:46,698 - INFO - HTTP Request: POST https://ark.cn-beijing.volces.com/api/v3/chat/completions "HTTP/1.1 401 Unauthorized" 2024-06-21 11:53:46,698 - DEBUG - HTTP Request: POST https://ark.cn-beijing.volces.com/api/v3/chat/completions "401 Unauthorized" 2024-06-21 11:53:46,698 - DEBUG - Encountered httpx.HTTPStatusError Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/volcenginesdkarkruntime/_base_client.py", line 448, in _request response.raise_for_status() File "/usr/local/lib/python3.11/site-packages/httpx/_models.py", line 761, in raise_for_status raise HTTPStatusError(message, request=request, response=self) httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://ark.cn-beijing.volces.com/api/v3/chat/completions' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401 2024-06-21 11:53:46,702 - DEBUG - Not retrying 2024-06-21 11:53:46,702 - DEBUG - receive_response_body.started request=<Request [b'POST']> 2024-06-21 11:53:46,702 - DEBUG - receive_response_body.complete 2024-06-21 11:53:46,702 - DEBUG - response_closed.started 2024-06-21 11:53:46,703 - DEBUG - response_closed.complete 2024-06-21 11:53:46,703 - DEBUG - Re-raising status error 是这样的
这里面的Openai应该改成什么 文档里的这几行是要我自己新增上去吗, VOLCENGINE_API_VERSION: v3 VOLCENGINE_MODEL: ep-20240522143915-k7mb7 VOLCENGINE_ACCESS_KEY: AKLTNDRkNzBmYxxxxxxxxxxxxxxxxxxx VOLCENGINE_SECRET_KEY: "Tm1JMFkyUTFaRE5qTm00000000000000000000000000000" 这四行是我自己添加吗,因为我在原配置文件中没有找到