“chatgpt-api” 和网页界面提供的答案不同。

huangapple go评论60阅读模式
英文:

Different answers from chatgpt-api and web interface

问题

I'm trying to integrate openai (==0.27.6) into my system, and it works kinda fine, however, the replies I'm getting through the API are totally worse than the answers from the web interface (https://chat.openai.com/chat) .

The way I'm using it with the API (python) is:

completions = openai.ChatCompletion.create(
    model = 'gpt-3.5-turbo',
    messages=[
        {
            'role': 'user',
            'content': prompt,
        }
    ]
)

At this version I'm not using other parameters, like temperature, however, previously with version 0.26.4 I used this:

completions = openai.Completion.create(
    engine='text-davinci-002',
    prompt=prompt,
    max_tokens=4000,
    n=3,
    stop=None,
    temperature=0.8
)

.

Do You guys have any idea how can I set the first example code to give similar answers to the web interface? There're many parameters that can be set, however, I did not find any documentation about the used values for the web interface.

Thanks.

英文:

I'm trying to integrate openai (==0.27.6) into my system, and it works kinda fine, however, the replies I'm getting through the API are totally worse than the answers from the web interface (https://chat.openai.com/chat) .

The way I'm using it with the API (python) is:

completitions = openai.ChatCompletion.create(
    model = 'gpt-3.5-turbo',
    messages=[
        {
            'role': 'user',
            'content': prompt,
        }
    ]
)

At this version I'm not using other parameters, like temperature, however, previously with version 0.26.4 I used this:

completitions = openai.Completion.create(\
engine='text-davinci-002',
prompt=prompt,
max_tokens=4000,
n=3,
stop=None,
temperature=0.8
)

.

Do You guys have any idea how can I set the first example code to give similar answers to the web interface? There' re many parameters that can be set, however, I did not find any documentation about the used values for the web interface.

Thanks.

答案1

得分: 1

你正在使用引擎 'text-davinci-002',这是 GPT-3 的变体,而网络门户使用的是 GPT-3.5-turbo。

英文:

you're using engine='text-davinci-002' which is a variation of GPT-3, and the web portal uses GPT-3.5-turbo

huangapple
  • 本文由 发表于 2023年5月10日 15:32:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76215950.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定