Write a markdown tutorial with code examples to get started with OpenAI’s GPT-3 completion API, using the latest text-davinci-003 model, in a modern symfony 6 web application using PHP 8 features. The exercise is about a symfony form (with multiple fields) to which we add a textarea that is used to construct a GPT-3 prompt, that will return a json of the form data to use, which is then used to update the other form fields data. The GPT-3 prompt is constructed using the form fields names and their description. The code uses a composer package for the openapi sdk that is uses guzzle.
Before the tutorial write a viral tweet to share the tutorial.