transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
MIT License
16.07k stars 2.11k forks source link

ChatGPT error 500: {"detail":"Hmm...something seems to have gone wrong."} #622

Closed FujiwaraChoki closed 5 months ago

FujiwaraChoki commented 9 months ago

Verify latest release

Verify webapp is working

Environment details

Windows 10

Describe the Bug

I keep getting this error, accessToken is fresh, no matter what reverse proxy url I try:

 ⨯ ChatGPTError: ChatGPT error 500: {"detail":"Hmm...something seems to have gone wrong."}
    at fetchSSE (file:///D:/Project/Business/Azen/node_modules/chatgpt/build/index.js:55:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  statusCode: 500,
  statusText: 'Internal Server Error',
  page: '/api/text/chat/[id]',
  [cause]: Response {
    [Symbol(realm)]: null,
    [Symbol(state)]: {
      aborted: false,
      rangeRequested: false,
      timingAllowPassed: true,
      requestIncludesCredentials: true,
      type: 'default',
      status: 500,
      timingInfo: [Object],
      cacheState: '',
      statusText: 'Internal Server Error',
      headersList: [HeadersList],
      urlList: [Array],
      body: [Object]
    },
    [Symbol(headers)]: HeadersList {
      cookies: null,
      [Symbol(headers map)]: [Map],
      [Symbol(headers map sorted)]: null
    }
  }
}

This is my function:

const queryChatBot = async (prompt, conversationId, parentMessageId) => {
    console.log("ACCESS TOKEN:");
    console.log(process.env.OPENAI_ACCESS_TOKEN);

    // Unofficial
    const api = new ChatGPTUnofficialProxyAPI({
        accessToken: process.env.OPENAI_ACCESS_TOKEN,
        apiReverseProxyUrl: "https://ai.fakeopen.com/api/conversation"
    });

    let res;
    if (conversationId || parentMessageId) {
        res = await api.sendMessage(prompt, {
            conversationId: conversationId,
            parentMessageId: parentMessageId,
        });
    } else {
        res = await api.sendMessage(prompt);
    }

    console.log(`SUCCESS: ${res.text}`);

    return {
        convoId: res.conversationId,
        message: {
            text: res.text,
            id: res.id,
            createdAt: new Date(),
        }
    };
};
ShawnALiu commented 9 months ago

{ "error": { "message": "Internal server error", "type": "auth_subrequest_error", "param": null, "code": "internal_error" } }

what's wrong ? can anyone help me ?

pleaseyang commented 9 months ago
{
  "error": {
    "message": "Internal server error",
    "type": "auth_subrequest_error",
    "param": null,
    "code": "internal_error"
  }
}

what's wrong ? can anyone help me ?

FujiwaraChoki commented 9 months ago

UPDATE: I saw that OpenAI had an outage for around 3 hours, so the package is not at fault :)