How exactly does the new messages object work on createChatCompletion

So heres just a little fake example I made in the playground

 messages=[
    {
      "role": "system",
      "content": "You are a helpful assistant for helping users name their pets."
    },
    {
      "role": "user",
      "content": "hey there"
    },
    {
      "role": "assistant",
      "content": "Hello! How can I help you today?"
    }
  ],

Exactly how is system user and assistant differentiated? I understand this would be the start of a chat? But is the user and assistant role just there to initially guide it sort of like few-shot learning by giving an example of chat?

Hi,

The model is trained to treat the various role types in different ways. The Role of system or user or assistant is passed to the model as part of the API call. The user roles are there to allow the model to know who said what and when, you can of course manipulate this if you wanted to alter the conversation structure after the event.

1 Like

Right this is what im thinking if theres some way i could do some post processing.

I have this kind of caching/post/preprocessing idea im just not sure how to go about it.