agentic icon indicating copy to clipboard operation
agentic copied to clipboard

results are different between api and browser

Open kknono opened this issue 2 years ago • 11 comments

Verify latest release

  • [X] I verified that the issue exists in the latest chatgpt release

Verify webapp is working

  • [X] I verify that the ChatGPT webapp is working properly for this account.

Environment details

18.0.0

Describe the Bug

Hi, results are different between api and browser

thx

kknono avatar Feb 09 '23 03:02 kknono

Maybe they using defferent model

melodysdreamj avatar Feb 09 '23 03:02 melodysdreamj

Pretty sure the new version of this package is using davinci, not chatgpt models which is what runs in the browser, so wouldn't expect the same results.

karam-khanna avatar Feb 09 '23 04:02 karam-khanna

Pretty sure the new version of this package is using davinci, not chatgpt models which is what runs in the browser, so wouldn't expect the same results.

can customize model?

kknono avatar Feb 09 '23 05:02 kknono

Pretty sure the new version of this package is using davinci, not chatgpt models which is what runs in the browser, so wouldn't expect the same results.

can customize model?

Yes @kknono, here’s how to override the default model

const api = new ChatGPTAPI({
    apiKey: process.env.OPENAI_API_KEY,
    completionParams: {
      model: 'text-davinci-003'
    }
})

kodjunkie avatar Feb 09 '23 05:02 kodjunkie

This is unfortunately expected for the time being. See my detailed answer here https://github.com/transitive-bullshit/chatgpt-api/issues/314#issuecomment-1422395492

transitive-bullshit avatar Feb 09 '23 19:02 transitive-bullshit

thx

kknono avatar Feb 11 '23 01:02 kknono

text-chat-davinci-002-sh-alpha-aoruigiofdj83 available now~

SmileSmith avatar Feb 11 '23 05:02 SmileSmith

@SmileSmith this model 404's for me. Where did you find it?

Nevermind; it got disabled.

transitive-bullshit avatar Feb 11 '23 07:02 transitive-bullshit

Why is this lib misleading developers advertising the package as "ChatGPT" when it actually uses text-davinci-003? model should be text-chat-xxx...

telemakhos avatar Feb 15 '23 16:02 telemakhos

@telemakhos see my previous answer here https://github.com/transitive-bullshit/chatgpt-api/issues/314#issuecomment-1422395492

transitive-bullshit avatar Feb 15 '23 23:02 transitive-bullshit

You can now use ChatGPTUnofficialProxyAPI which uses the a proxied version of the real ChatGPT API. Upgrade to https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v4.5.0 and check out the readme for usage info and notes on tradeoffs.

transitive-bullshit avatar Feb 19 '23 08:02 transitive-bullshit

Browser version use "gpt-3.5-turbo" model.

Usage example (Python):

openai.ChatCompletion.create(
 model="gpt-3.5-turbo",
 messages=[
       {"role": "system", "content": "You are a helpful assistant."},
       {"role": "user", "content": "Who won the world series in 2020?"},
       {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
       {"role": "user", "content": "Where was it played?"}
   ]
)

More details here - OpenAI Documentation

AndrejGorodnij avatar Mar 02 '23 14:03 AndrejGorodnij

how can I override the default modeland use "gpt-turbo"model?I mean which file should I edit? And should I run any thing after edit? thank you very much!

BobWangRobot avatar Mar 03 '23 14:03 BobWangRobot

how can I override the default modeland use "gpt-turbo"model?I mean which file should I edit? And should I run any thing after edit? thank you very much!

Here is snippet from repository READMY.md:

const api = new ChatGPTAPI({
  apiKey: process.env.OPENAI_API_KEY,
  completionParams: {
    temperature: 0.5,
    top_p: 0.8
  }
})

It looks pretty similar to my Python example, so you can try to add model="gpt-3.5-turbo" parameter, maybe it will work (I'm Python developer, that just make research about difference between browser and api versions)

AndrejGorodnij avatar Mar 03 '23 15:03 AndrejGorodnij

@BobWangRobot @AndrejGorodnij just update to the latest v5 of this package and use ChatGPTAPI, which already uses the gpt-3.5-turbo model.

transitive-bullshit avatar Mar 03 '23 23:03 transitive-bullshit

ok, thank you very much!

BobWangRobot avatar Mar 04 '23 01:03 BobWangRobot