Why do the docs suggest GPT-4 can be used for completions when it can't?

The model docs for GPT-4 say “Like gpt-3.5-turbo , GPT-4 is optimized for chat but works well for traditional completions tasks.”

But when I try to use model='gpt-4' in the v1/completions endpoint, I get this error InvalidRequestError: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?

Kind of misleading, no?

1 Like

Hey @christmas. Welcome to the community :slight_smile:
When OpenAI talks about “traditional completion tasks” in this context, they do not refer to the completions endpoint. You can reproduce “traditional completion tasks” in the chat mode by sending a single pair of messages, for instance. A system message that instructs the model about what to do, and a user message as the whole context for the completion. The returned assistant message will be the result of the completion.

I agree that can be a little bit misleading. But that’s the current state of affairs :slight_smile:. Hope it helps!!

Hi @christmas,

did you by chance use the wrong URL in your request?

Find the overview attached:

Thanks for this. Just wanted to double check that this is confirmed? Do you know if they have any plans to add GPT-4 for the completions endpoint soon? For my use cases right now, the chat mode isn’t ideal. Couldn’t find a concrete answer about this.

Yes, it is in the official documentation.

I don’t know anything about future plans, but adding this backwards compatibility doesn’t seem to be a priority rn. I could be fully wrong though. Sorry for not being able to help further :slight_smile:

1 Like

You will have to refactor your code to get a completion, but it does work. My only concern is in the docs it says “GPT-4 is optimized for chat but works well for traditional completions tasks.” So not sure if this means there is another iteration of GPT-4 that will be optimized for completion tasks. Einstein maybe?

1 Like