Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server problem (500) #342

Open
oneOfThePeakyBlinders opened this issue May 19, 2024 · 8 comments
Open

server problem (500) #342

oneOfThePeakyBlinders opened this issue May 19, 2024 · 8 comments

Comments

@oneOfThePeakyBlinders
Copy link

Whenever i make requests, server responds with the 500 error:
"
POST / 500 in 7716ms
⨯ ..\core\util\retry-with-exponential-backoff.ts (51:13) @ _retryWithExponentialBackoff
⨯ AI_RetryError: Failed after 3 attempts. Last error: Failed to process error response
at async $$ACTION_1 (./lib/chat/actions.tsx:178:20)
digest: "3825323688"
49 |
50 | if (tryNumber > maxRetries) {

51 | throw new RetryError({
| ^
52 | message: Failed after ${tryNumber} attempts. Last error: ${errorMessage},
53 | reason: 'maxRetriesExceeded',
54 | errors: newErrors,
The streamable UI has been slow to update. This may be a bug or a performance issue or you forgot to call .done().
⨯ ..\core\util\retry-with-exponential-backoff.ts (51:13) @ _retryWithExponentialBackoff
⨯ AI_RetryError: Failed after 3 attempts. Last error: Failed to process error response
at async $$ACTION_1 (./lib/chat/actions.tsx:178:20)
digest: "3825323688"
49 |
50 | if (tryNumber > maxRetries) {
51 | throw new RetryError({
| ^
52 | message: Failed after ${tryNumber} attempts. Last error: ${errorMessage},
53 | reason: 'maxRetriesExceeded',
54 | errors: newErrors,
POST / 500 in 7495ms
The streamable UI has been slow to update. This may be a bug or a performance issue or you forgot to call .done().
"

What's the problem? What might it be?

@oneOfThePeakyBlinders
Copy link
Author

And also in the console it refers to promt-form.tsx:65: const responseMessage = await submitUserMessage(value)
setMessages(currentMessages => [...currentMessages, responseMessage])

@skath1
Copy link

skath1 commented May 23, 2024

were you able to solve this issue?

@oneOfThePeakyBlinders
Copy link
Author

were you able to solve this iss
Unfortunately no(
Are you facing the same issue?

@0xbohu
Copy link

0xbohu commented May 26, 2024

same issue

@0xbohu
Copy link

0xbohu commented May 26, 2024

@oneOfThePeakyBlinders I have fixed it, the reason is that you need to add credits to your OpenAI for API usage. https://platform.openai.com/settings/organization/billing/overview

API credits is not included in GPT 4plus subscription. Once you add credits to your API, create a new api key and it should work.

I have also raised an issue in ai repo, it is still a bug to parse openAI error response and team is looking at it.
vercel/ai#1694 (comment)

@lgrammel
Copy link

The OpenAI SDK Provider here needs to be updated. This is not an AI SDK problem.

@oneOfThePeakyBlinders
Copy link
Author

How to update it properly?

@lgrammel
Copy link

Update it to the latest version (@ai-sdk/openai)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants