Chat GPT-4 Turbo

भुगतान किया गया
द्वारा Swift API | अपडेट किया गया a day ago | Artificial Intelligence/Machine Learning
लोकप्रियता

9.2 / 10

लेटेंसी

6,115ms

सेवा का स्तर

99%

Health Check

100%

सभी चर्चाओं पर वापस जाएं

How can I have a continuous conversation?

Rapid account: Kiekeer 12
Kiekeer12
6 months ago

How can I continue the previous round of the request dialogue?

Rapid account: Swift 4 API
Swift4API Commented 6 months ago

Hi,

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.

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें