(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error:...
🚨 错误信息
raceback (most recent call last):
File "/root/TEST/newwwww.py", line 153, in <module>
main()
File "/root/TEST/newwwww.py", line 141, in main
raw1 = call_model(p1, temperature=0.2)
File "/root/TEST/newwwww.py", line 51, in call_model
resp.raise_for_status()
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 1026, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://www.dmxapi.cn/v1/chat/completions
🤖 AI解决方案
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://www.dmxapi.cn/v1/chat/completions
错误翻译
requests.exceptions.HTTPError: 500 服务器错误:内部服务器错误,URL: https://www.dmxapi.cn/v1/chat/completions
原因分析
API 调用时,服务器端发生了一个未处理的内部错误(HTTP 500)。
解决方案
call_model 函数中传递给 DMXAPI 的所有参数,确保它们符合 API 文档的要求。预防措施