#950·paper-qa

在 Docs 对象中出现 "AuthenticationError: OpenAIException - 错误代码: 401"

作者: bigboisw创建于 2025年5月14日更新于 2026年4月29日
标签bug

发生了异常: AuthenticationError litellm.AuthenticationError: AuthenticationError: OpenAIException - Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-no-ke******ired. You can find your API key at https://platform.LLM.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}} 已收到模型组=GPT-4o-2024-08-06 可用的模型组回退=None httpx.HTTPStatusError: 客户端错误 '401 Unauthorized' 适用于 URL 'https://api.OpenAI.com/v1/chat/completions' 更多信息请查看: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401 在处理上述异常时,又发生了另一个异常: OpenAI.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-no-ke******ired. You can find your API key at https://platform.OpenAI.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}} 在处理上述异常时,又发生了另一个异常: litellm.llms.OpenAI.OpenAI.OpenAIError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-no-ke******ired. You can find your API key at https://platform.OpenAI.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}} 在处理上述异常时,又发生了另一个异常: 文件 "C:\Users\Sean\Documents\Python Testing\PaperQA\test.py", 行 21, 在 <module> 中 文件 "C:\Users\Sean\Documents\Python Testing\PaperQA\test.py", 行 21, 在 <module> 中 litellm.exceptions.AuthenticationError: litellm.AuthenticationError: AuthenticationError: OpenAIException - Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-no-ke******ired. You can find your API key at https://platform.OpenAI.com/account/api-keys.', 'type':

内容来源: Future-House/paper-qa