Is it possible to do text completion with GPT-4o?


I was wondering if it’s possible with the current APIs and models to do chat completion, in the sense that the assistant should complete a partial answer. For example, suppose I have an incomplete answer in a conversation:

    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Do you think that was a good idea?"},
    {"role": "assistant", "content": "Yes but"}

Then I want GPT to complete the answer.

Thank you very much in advance for your answer!

You can’t achieve this with chat completion, but you can with the completion endpoint.

As follows:

response = client.completions.create(
  prompt="You are a helpful assistant. Do you think that was a good idea? Yes but",

You can use models like GPT-3.5-instruct for this.
But you can’t use GPT-4 or GPT-4o for completion.


it ultimately depends on the specific situation

1 Like

You can approximate the behavior of completions with chat completions if you instruct the model through the system message to complete the text provided by the user.

I made this custom GPT which does the same and has been working well enough for me for a couple of weeks: