acheong08 / ChatGPT

Reverse engineered ChatGPT API
GNU General Public License v2.0
28.03k stars 4.48k forks source link

[Feature Request]: New ChatGPT API supports. #975

Closed hongyi-zhao closed 1 year ago

hongyi-zhao commented 1 year ago

Is there an existing issue for this?

What would your feature do ?

Today, I received the following notification from OpenAI:

Starting today, you can build apps and products with our new ChatGPT and Whisper APIs. You can read more about the APIs and early partners’ use cases here.

ChatGPT API

The new Chat API calls gpt-3.5-turbo, the same model used in the ChatGPT product. It’s also our best model for many non-chat use cases; we’ve seen early testers migrate from text-davinci-003 to gpt-3.5-turbo with only a small amount of adjustment needed to their prompts. Learn more about the Chat API in our documentation.

Pricing It’s priced at $0.002 per 1K tokens, which is 10x cheaper than the existing GPT-3.5 models.

Model updates We are constantly improving our Chat models, and want to make these improvements available to developers as well. Developers who use the gpt-3.5-turbo model will always get our recommended stable model, while still having the flexibility to opt for a specific model version.

For example, today we’re releasing “gpt-3.5-turbo-0301”, which will be supported through at least June 1st, and we’ll update gpt-3.5-turbo to a new stable release in April. The models page will provide switchover updates.

Whisper API

We’ve been thrilled to see the community response to Whisper, the speech-to-text model we open-sourced in September 2022. Starting today, the large-v2 model is available through our API as whisper-1 – making it the fastest, cheapest, and most convenient way to use the model. Learn more about the Whisper API in the documentation.

Pricing The API is priced at $0.006 / minute, rounded up to the nearest second.

Changes in our policies and how we use your data

Over the past six months, we’ve been collecting feedback from our API customers to understand how we can better serve them. We’ve made a number of concrete changes, such as:

Data submitted through the API is no longer used for model training or other service improvements, unless you explicitly opt in
Implementing a default 30-day data retention policy for API users, with options for shorter retention windows depending on user needs
Removing our pre-launch review – unlocked by improving our automated monitoring
Simplifying our Terms of Service and Usage Policies, including terms around data ownership: users own the input and output of the models

Check out what our early partners like Snap, Shopify, and Instacart have built with the new APIs – and start building next-generation apps powered by ChatGPT & Whisper today.

—The OpenAI team

So, I issued this FR.

Best, Zhao

Proposed workflow

  1. Go to ....
  2. Press ....
  3. ...

Additional information

No response

JIACHENG135 commented 1 year ago

It looks like that as of now e.g. 2023-03-01, the gpt-3.5-turbo model doesn't support conversation, which is the most fascinating and powerful feature of chatgpt. And most of the classical chatgpt prompts are not working well on the gpt-3.5-turbo (so called the latest one). I'm upset about this release.

slavakurilyak commented 1 year ago

You can now use POST https://api.openai.com/v1/chat/completions to create a chat completion

acheong08 commented 1 year ago

Duplicate of

acheong08 commented 1 year ago

It looks like that as of now e.g. 2023-03-01, the gpt-3.5-turbo model doesn't support conversation, which is the most fascinating and powerful feature of chatgpt. And most of the classical chatgpt prompts are not working well on the gpt-3.5-turbo (so called the latest one). I'm upset about this release.

It does.

olegsvs commented 1 year ago

@acheong08 what about tokens?

Error: 400 Bad Request {
  "error": {
    "message": "This model's maximum context length is 4096 tokens. However, your messages resulted in 4144 tokens. Please reduce the length of the messages.",
    "type": "invalid_request_error",
    "param": "messages",
    "code": "context_length_exceeded"
  }
}
acheong08 commented 1 year ago

Need to fix

JIACHENG135 commented 1 year ago

It looks like that as of now e.g. 2023-03-01, the gpt-3.5-turbo model doesn't support conversation, which is the most fascinating and powerful feature of chatgpt. And most of the classical chatgpt prompts are not working well on the gpt-3.5-turbo (so called the latest one). I'm upset about this release.

It does.

It does, but not explicitly does. You need tricks to support that.

acheong08 commented 1 year ago

https://platform.openai.com/docs/guides/chat/introduction

hongyi-zhao commented 1 year ago

https://github.com/acheong08/ChatGPT/issues/975#issuecomment-1451270606 It does, but not explicitly does. You need tricks to support that.

I want to know whether it is possible to achieve this goal from the perspective of this project?

acheong08 commented 1 year ago

#975 (comment) It does, but not explicitly does. You need tricks to support that.

I want to know whether it is possible to achieve this goal from the perspective of this project?

I already did it

hongyi-zhao commented 1 year ago

I already did it

It seems that you mean the following one described in README:

image

BTW, to use this API interface, must I regenerate a separate <api_key>? If so, where is the web URL to do so?

acheong08 commented 1 year ago

It seems that you mean this one:

Yes, did you mean something else?

acheong08 commented 1 year ago

BTW, to use this API interface, must I regenerate a separate ? If so, where is the web URL to do so?

https://platform.openai.com/account/api-keys

hongyi-zhao commented 1 year ago

Yes, did you mean something else?

Not really. Just wanted to make sure we understand each other correctly. Because this new technology is easy to misunderstand each other on some communication details and lead to a waste of time.

hongyi-zhao commented 1 year ago

https://platform.openai.com/account/api-keys

I tried with my API key, the results show that this method has a much faster speed. Does it mean more expensive use costs?

However, this method does not support the use of arrow keys to move the cursor, as shown below:

image

hongyi-zhao commented 1 year ago

Another question on gpt-3.5-turbo model, see my inquiry and ChatGPT's answer:

(datasci) werner@X10DAi:~$ python3 -m revChatGPT.V3 --api_key <api_key> 

    ChatGPT - Official ChatGPT API
    Repo: github.com/acheong08/ChatGPT

Type '!help' to show a full list of commands
Press enter twice to submit your question.

User:
Do you use the gpt-3.5-turbo model?

ChatGPT: 
As an AI language model, I don't have access to specific information about the models used to train me or any other AI language model. However, I was trained using a variant of the GPT architecture, which is a very popular and effective approach for natural language processing tasks.

User:

(datasci) werner@X10DAi:~$ python3 -m revChatGPT.V1

        ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
        Repo: github.com/acheong08/ChatGPT

Type '!help' to show a full list of commands
Press Esc followed by Enter or Alt+Enter to send a message.
Logging in...

You:
Do you use the gpt-3.5-turbo model?

Chatbot: 
As an AI language model, I am not capable of using any specific model, including the "gpt-3.5-turbo" model that you mentioned. However, I am trained on a large dataset that includes a wide range of language models, including but not limited to GPT-3, which enables me to understand and generate human-like responses to a wide range of questions and topics.

You:

Why would it give such an explanation?

acheong0 commented 1 year ago

dunno

acheong08 commented 1 year ago

I tried with my API key, the results show that this method has a much faster speed. Does it mean more expensive use costs?

$0.002 per 1k tokens. Reference: https://platform.openai.com/pricing. It's cheaper than GPT-3

However, this method does not support the use of arrow keys to move the cursor, as shown below:

I'll fix that