在gpts中发送一个post请求出现以下错误,但是调用其他的get请求是正常的,为什么?是不是gpts在发送post请求时,把格式进行了转换,导致了请求错误? 左边是GPTS在debug模式下发送的请求参数, 右边是在postman中请求的接口参数。 左边报错了,右边正常返回 "image.png" (https://wmprod.oss-cn-shanghai.aliyuncs.com/c/user/20240929/c6edeb3f694a9cfedeceb01c6a26fd0d.png) chatGPT GPTs中完整的报错信息如下: { "response_data": { "error": { "type": "INVALID_REQUEST_UNKNOWN", "message": "Invalid request: parameter validation failed. Check your request data." } }, "status_code": 422, "action_id": "g-fc4f5e0f9d61f1dd099ec4da991b56ab2e66012b" }
Nextjs了一个openai服务,请求发现不走梯子,连接不上,有没有解决方案? 搭了个梯子用openai的api。结果发现nextjs不走梯子。梯子改为全局也不行,用终端代理命令启动服务也不行。有没有朋友知道神木原因? GET / 200 in 2524ms ✓ Compiled in 237ms (581 modules) RetryError [AI_RetryError]: Failed after 3 attemps. Last error: Cannot connect to API: read ECONNRESET at _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:718:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { reason: 'maxRetriesExceeded', errors: [ APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined }, APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined }, APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined } ], lastError: APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: { model: 'gpt-3.5-turbo', logit_bias: undefined, user: undefined, max_tokens: undefined, temperature: undefined, top_p: undefined, frequency_penalty: undefined, presence_penalty: undefined, seed: undefined, messages: [Array], tool_choice: [Object], tools: [Array] }, statusCode: undefined, responseBody: undefined, cause: Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -54, code: 'ECONNRESET', syscall: 'read' }, isRetryable: true, data: undefined } } ⨯ unhandledRejection: RetryError [AI_RetryError]: Failed after 3 attemps. Last error: Cannot connect to API: read ECONNRESET at _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:718:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { reason: 'maxRetriesExceeded', errors: [ APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined }, APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined }, APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined } ], lastError: APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: { model: 'gpt-3.5-turbo', logit_bias: undefined, user: undefined, max_tokens: undefined, temperature: undefined, top_p: undefined, frequency_penalty: undefined, presence_penalty: undefined, seed: undefined, messages: [Array], tool_choice: [Object], tools: [Array] }, statusCode: undefined, responseBody: undefined, cause: Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -54, code: 'ECONNRESET', syscall: 'read' }, isRetryable: true, data: undefined } } ⨯ unhandledRejection: RetryError [AI_RetryError]: Failed after 3 attemps. Last error: Cannot connect to API: read ECONNRESET at _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:718:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { reason: 'maxRetriesExceeded', errors: [ APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined }, APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined }, APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: [Object], statusCode: undefined, responseBody: undefined, cause: [Error], isRetryable: true, data: undefined } ], lastError: APICallError [AI_APICallError]: Cannot connect to API: read ECONNRESET at postToApi (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:398:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OpenAIChatLanguageModel.doGenerate (webpack-internal:///(rsc)/./node_modules/ai/openai/dist/index.mjs:783:22) at async _retryWithExponentialBackoff (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:706:12) at async experimental_generateObject (webpack-internal:///(rsc)/./node_modules/ai/dist/index.mjs:839:30) at async taskManager (webpack-internal:///(rsc)/./lib/agents/task-manager.tsx:13:20) at async processEvents (webpack-internal:///(rsc)/./app/action.tsx:55:29) { url: 'https://api.openai.com/v1/chat/completions', requestBodyValues: { model: 'gpt-3.5-turbo', logit_bias: undefined, user: undefined, max_tokens: undefined, temperature: undefined, top_p: undefined, frequency_penalty: undefined, presence_penalty: undefined, seed: undefined, messages: [Array], tool_choice: [Object], tools: [Array] }, statusCode: undefined, responseBody: undefined, cause: Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -54, code: 'ECONNRESET', syscall: 'read' }, isRetryable: true, data: undefined } }