You can continue the dialog by inserting the messages inside the messages array. For example:
{
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is the result of 4 + 5"
},
{
"role": "assistant",
"content": "The result is 9"
},
{
"role": "user",
"content": "Add 10 to the previous result"
},
{
"role": "assistant",
"content": "If we add 10 to the previous result, which is 9, the result will be 19"
}
]
}
As you can see inside the messages array, we can insert our messages with three roles:
"role": "system" which represents instructions for the AI model. Here you can tell the model how to act and respond.
"role": "user" which represents a user’s message.
"role": "assistant" which represents the model response.
Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:
Anmelden / Registrieren, um neue Kommentare zu veröffentlichen
Hi,
You can continue the dialog by inserting the messages inside the
messages
array. For example:As you can see inside the
messages
array, we can insert our messages with three roles:"role": "system"
which represents instructions for the AI model. Here you can tell the model how to act and respond."role": "user"
which represents a user’s message."role": "assistant"
which represents the model response.