OpenAI’s ChatGPT is designed to interact based on text inputs. These inputs can be structured as an ongoing conversation. An example message for ChatGPT might look like this:
```
‘messages’: [{‘role’: ‘system’, ‘content’: ‘You are a helpful assistant.’}, {‘role’: ‘user’, ‘content’: ‘Who won the world series in 2020?’}]
```
A conversation usually begins with a system message, which sets the behavior of the assistant. This is followed by alternating user and assistant messages. Note that while a system message isn’t always required, it can help in setting the stage and instructing the model to produce on-point responses.
The ‘content’ in each message represents what the role (‘system’, ‘user’, or ‘assistant’) has said.