curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'
I have some confusion regarding the application of chat/completions.
How long is the message saved after I make a request?
And how can I access messages I've sent before?
Additionally, here's my understanding of its usage:
First, if I want to converse with it, I must use role: system to teach the AI how to assist users.
Afterward, I can include the content I wish to discuss in messages with role: user.
Can this process send multiple messages? Please provide me with examples of multiple messages.
Then, I want to understand, if with role: system, I have many messages that are the same, can I reuse previous content?
Or does each message require teaching again?
I don't want to keep rewriting the same instructions;
I want to know if this type of guidance has any form of memory.