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

-- GPT-4 API usable? #208

Closed
xpediteur opened this issue Mar 18, 2023 · 13 comments
Closed

-- GPT-4 API usable? #208

xpediteur opened this issue Mar 18, 2023 · 13 comments

Comments

@xpediteur
Copy link

Hi, can the GPT-4 API already be used with the current version? I got an error when I set the model to "GPT-4". THX

@yuwangi
Copy link
Contributor

yuwangi commented Mar 18, 2023

what error? please show it

@xpediteur
Copy link
Author

xpediteur commented Mar 18, 2023

the error:

error: {
      message: 'This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?',
      type: 'invalid_request_error',
      param: 'model',
      code: null
   }

But, sorry, this was an old version 2 weeks ago!

I installed the new "version": "1.31.2", and get the error with using "GPT-4":

error: {
      message: 'Incorrect API key provided: sk-u5yAB***************************************N6NQ. You can find your API key at https://platform.openai.com/account/api-keys.',
      type: 'invalid_request_error',
      param: null,
      code: 'invalid_api_key'
    }

I have set my current API-KEY correctly. With the old version and gpt-3.5-turbo the API-KEY works without problems.

@hoonlight
Copy link

hoonlight commented Mar 18, 2023

the error:

error: {
      message: 'This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?',
      type: 'invalid_request_error',
      param: 'model',
      code: null
   }

But, sorry, this was an old version 2 weeks ago!

I installed the new "version": "1.31.2", and get the error with using "GPT-4":

error: {
      message: 'Incorrect API key provided: sk-u5yAB***************************************N6NQ. You can find your API key at https://platform.openai.com/account/api-keys.',
      type: 'invalid_request_error',
      param: null,
      code: 'invalid_api_key'
    }

I have set my current API-KEY correctly. With the old version and gpt-3.5-turbo the API-KEY works without problems.

Aren't you still on the gpt-4 waitlist?
I applied to use the api right after the release, but I haven't received a response yet.
https://openai.com/waitlist/gpt-4-api

@xpediteur
Copy link
Author

I got this email from openAI:

**You're invited to use the OpenAI GPT-4 API!

You can now access GPT-4 models with 8K context via the existing OpenAI API.**

API should be open for me. But the current package is ready for GPT-4 or ?

@xpediteur
Copy link
Author

I have now tried again and it works! Without stream, however, the response takes a very long time. Thanks for the support.

@waylaidwanderer
Copy link
Owner

Glad to hear your issue was resolved.

@VictimOfPing
Copy link

I have now tried again and it works! Without stream, however, the response takes a very long time. Thanks for the support.

Hi, I have the same problem as you, can you tell me how you solved it?

@xpediteur
Copy link
Author

@puritynetwork
I installed the new "version": "1.31.2", and after waiting a while, the API was unlocked by openAI and it works like charm. Or what problem do you have exactly?

@VictimOfPing
Copy link

@puritynetwork I installed the new "version": "1.31.2", and after waiting a while, the API was unlocked by openAI and it works like charm. Or what problem do you have exactly?

An error occurred. Please try again in a few moments.

Error message: Failed to send message. HTTP 404 - {
"error": {
"message": "This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?",
"type": "invalid_request_error",
"param": "model",
"code": null
}
}

@VictimOfPing
Copy link

@puritynetwork I installed the new "version": "1.31.2", and after waiting a while, the API was unlocked by openAI and it works like charm. Or what problem do you have exactly?

How to install new version

@xpediteur
Copy link
Author

@puritynetwork
npm install @waylaidwanderer/chatgpt-api@latest

@VictimOfPing
Copy link

npm install @waylaidwanderer/chatgpt-api@latest

now it responds to me but gives this error:

An error occurred. Please try again in a few moments.

Error message: Cannot read properties of undefined (reading 'includes')

@xpediteur
Copy link
Author

@puritynetwork
google or chatGPT should be your friend. The error is very unspecific.

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

5 participants