#ChatGPT Completions API doesn’t reply as the web chat playground does?

27 messages · Page 1 of 1 (latest)

sinful phoenix
#

Hi

see the copy pasted conversation with https://chat.openai.com/chat :

come ti chiami?

Non ho un nome, sono solo un modello di linguaggio addestrato da OpenAI. Sono qui per rispondere alle tue domande e fornirti informazioni generali su una vasta gamma di argomenti. Se hai altre domande, non esitare a chiedere.

what is your name?

As I mentioned before, I am a large language model trained by OpenAI and do not have a name. I am designed to assist with a wide range of tasks, including answering questions and providing information on a variety of topics. I am here to help, so if you have any further questions, please feel free to ask.

Now, if I use the trivial bash script:

# !/bin/bash
API_KEY='MY_OPENAI_APY_KEY'

curl https://api.openai.com/v1/completions \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $API_KEY" \
  -d '{
  "model": "text-davinci-002",
  "prompt": "what is your name?"
}'
{"id":"cmpl-6JXXXXXXXXX","object":"text_completion","created":1670105179,"model":"text-davinci-002","choices":[{"text":"\n\nMy name is Sarah.","index":0,"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":5,"completion_tokens":7,"total_tokens":12}}

My name is Sarah?

That's insane. I mean that the ChatGPT web chat is great but when I call it via API I got very DIFFERENT (inconsistent/weird) answers. why? I'm wrong selecting the model name or other parameters? I'm confused.

See also:
https://community.openai.com/t/chatgpt-completions-api-doesnt-reply-as-the-web-chat-playground-does/23655

Any idea?
Thanks
Giorgio

OpenAI API Community Forum

Hi see the copy pasted conversation with ChatGPT : come ti chiami? Non ho un nome, sono solo un modello di linguaggio addestrato da OpenAI. Sono qui per rispondere alle tue domande e fornirti informazioni generali su una vasta gamma di argomenti. Se hai altre domande, non esitare a chiedere. what is your name? As I mentioned before, ...

static garnet
#

So from what I've learned, it's using a fine tuned GPT-3 model they haven't made public yet. Try using text-davinci-003 to see what result you get.

sinful phoenix
#

Thanks Jack.
Well, using text-davinci-003 I got a pretty similar answer:

$ openapi_call.sh
{"id":"cmpl-YYYYYYYYYYYYYY","object":"text_completion","created":1670107639,"model":"text-davinci-003","choices":[{"text":"\n\nMy name is Cassandra.","index":0,"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":5,"completion_tokens":7,"total_tokens":12}}

as you see, openai API answers pretty random stuff, absolutely different from what answered in the https://chat.openai.com/chat web interface.

BTW, I asked about it with ChatGPT via web chat and

  • it "insisted" to try the text-davinci-002, just to have pretty identical answers. But it's not working as expected
  • it doesn't mention any fine-tuning to be applied.

Weird...

dry vault
#

As far as I understand the new ChatGPT is a model not released to any API, it is different than davinci003 (or any prior davinci). They released it in web format only so far, for beta feedback. Maybe sometime soon we will get it in API form.

#

Although I am getting much better results for certain prompts from davinci 003 over 002. Specifically around creative prompts like lyrics or poems.

plush granite
#

Definitely ChatGPT model giving much better and detailed answers than davinci

sinful phoenix
#

thanks for feedback.
yes it seems that any text-davinci-* model in APIs is NOT the same model used by ChatGPT online. That's weird because openai API documentation doesn't say anything about the fact the ChatGPTmodel is NOT (still) available, and ChatGPT states that the correct model to be used on the API call (with code examples) is just text-davinci-002. That's apparently false as you confirmed. It's a pity to be notallowed to use APi for the new model.

bright cradle
#

It is only a matter of time though right?

sinful phoenix
timid stag
#

If anyone from openai sees this though I'd love for the model and priming for chatgpt to be publicized if possible :). I see it is using text-davinci-002-render and am unsure if render refers to an arbitrary instance of text-davinci-002 for public use or if is fine tuned or something.

sinful phoenix
#

BTW, I double-checked the workaround you suggests.
It's true, the model used on the browser call is text-davinci-002-render

but if I try the curl

curl https://api.openai.com/v1/completions \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $API_KEY" \ -d '{ "model": "text-davinci-002-render", "prompt": "what is your name?" }'

I got the error:

{ "error": { "message": "That model does not exist", "type": "invalid_request_error", "param": null, "code": null } }

versed mist
#

I think the ChatGPT application is not only using a different API (or at least a different model), but fine-tuned settings as well. You can mimic some of those settings with the collections API, but the biggest limitation has been length of response. Maxing out a collections reposes still really only nets me 400 words, where ChatGPT (it says so itself) doesn't have a limit but tries to 'answer the question completely. I'm sure there's some max limit though - otherwise it could write a 500 page novel and it won't.'

stray vessel
#

Chat has no api

#

So I am confused by this thread

static garnet
median river
sinful phoenix
sinful phoenix
stray vessel
sinful phoenix
jagged karma
#

You've understood everything correctly. ChatGPT ist based on a new, unreleased model which you cannot access publicly. You can use workaround which leverage the website in the Background (which you've found as well). However, I would not use this in a business for obvious reasons

timid stag
atomic nova
#

Hi

static garnet
honest flare
#

I am new here. How can i export the conversation? Just copy-paste?

static garnet
#

Hi Everyone,
A month has passed - any news or updates?