New GPT-3 capabilities: Edit & insert
We’ve released new versions of GPT-3 and Codex which can edit or insert content into existing text, rather than just completing existing text.
Insert is particularly useful for writing code. In fact, Codex was our original motivation for developing this capability, since in software development we typically add code to the middle of an existing file where code is present before and after the completion. In the example above, the model successfully completes the missing function prune, while connecting to code already written. We also add a docstring and missing imports, which is not possible without knowing the code that comes after. In GitHub Copilot, Insert is currently being piloted with early promising results.
The insert capability is available in the API today in beta, as part of the completions endpoint(opens in a new window) and via a new interface in Playground(opens in a new window). The capability can be used with the latest versions of GPT‑3 and Codex, text-davinci-002 and code-davinci-002. Pricing is the same as previous versions of Davinci.