RainEggplant / chatgpt-telegram-bot

A ChatGPT bot for Telegram based on Node.js. Support both browserless and browser-base APIs.
MIT License
323 stars 97 forks source link

[Feature Request]: Does the Official API Support GPT-4? #45

Closed chk86 closed 1 year ago

chk86 commented 1 year ago

Not a duplicate feature request

Supported by the upstream API

Describe the feature

Can the default model be switched at all? I saw that the unofficial type you can specify the chatgpt model, but I wasn't sure if that was the same for the official type. I went ahead and specified "gpt-4" in the local.json file, but unsure if it's working or not.

Additional context

No response

RainEggplant commented 1 year ago

Yes. You just need to specify the correct model name for GPT-4 in api.official.completionParams.model.

chk86 commented 1 year ago

Just to be clear, where do you specify the correct model? I attempted changing the model in the local.json file, but that does not appear to do anything. It still uses the 3.5-turbo model.

RainEggplant commented 1 year ago

Just to be clear, where do you specify the correct model? I attempted changing the model in the local.json file, but that does not appear to do anything. It still uses the 3.5-turbo model.

Did you set api.official.completionParams.model to gpt-4 in local.json like this?

{
  "api": {
    "official": {
      "completionParams": {
        "model": "gpt-4"
      },
      "maxModelTokens": 8100
    }
}

According to the author (https://github.com/transitive-bullshit/chatgpt-api/issues/471#issuecomment-1469260101) of the chatgpt node api, GPT-4 is supported.

chk86 commented 1 year ago

@RainEggplant No! Thanks for taking the time to show me. I had model outside of the completionParms braces. Now it's working fine. Thanks!