Conversation History in Prompt vs in Messages Array

What’s the benefit or difference in passing an array of messages:

[{'role': 'system', 'content': 'You are a robot...'},{}, {}, {}....]

vs creating a prompt and passing that in as a single message:

[{
'role': 'system',
'content': '''
You are a robot. You respond with boop or beep depending on what the user told you.
### 
Conversation History: 
system: beep
user: yeah but I needed that paper yesterday and they didn't deliver
system: boop
...
###
'''
}]

Is it basically whatever works best for you when using the API?

1 Like