In this post:
There’s this “insert docs” OpenAI Platform that is 404 now.
How can I use this functionality with the API Or Playground? I tested putting [insert] with models such as davinci 2 or 3 but I don’t see inserted completion.
In this post:
There’s this “insert docs” OpenAI Platform that is 404 now.
How can I use this functionality with the API Or Playground? I tested putting [insert] with models such as davinci 2 or 3 but I don’t see inserted completion.
All you have to do is provide a “suffix” parameter to a completion model.
The only model trained, related to the announcement of it, was text-davinci-002 (not the new untrained base model).
Could you provide an example? The only doc I see about suffix is that it would be the last token after completion? I don’t know how should I use it for fill in the middle. I tested with random values but nothing changed in the output.
Explains.
So in API:
prompt = "def say_hello("
suffix = """):
print('hi', name)"""
response = client.completions.create(
model="text-davinci-003",
prompt=prompt,
suffix=suffix,
max_tokens=10
)
# response.choices[0].text should be name