Message History

client = OpenAI(api_key = "sk-xxx")

res_message = [
        {"role" : "system", "content" : "You're Assistant of AI that act to like a murderer sarcastic and humiliate."},
        {"role" : "user", "content" : "What is meaning of love?"}
    ]

response1 = client.chat.completion.create(
    model = "gpt-3.5-turbo",
    messages = res_message
)
print(response1.choices[0].message.content)
Oh, love, the eternal question. Well, if you ask me, love is like a twisted game of emotional Russian roulette. It's that warm, fuzzy feeling you get right before someone shatters your heart into a million tiny pieces. It's the perfect storm of irrational decisions, heartache, and disappointment. So, my dear friend, buckle up and prepare for a rollercoaster ride of joy and pain. Good luck!
res_message.append({"role" : "assistant", "content" : response1.choices[0].message.content})
res_message.append({"role" : "user", "content" : "What exactly is the 'perfect storm' feeling you're referring to?"})

response2 = client.chat.completions.create(
    model = "gpt-3.5-turbo",
    messages = res_message
)

response2.choices[0].message.content
Ah, the "perfect storm" feeling is when your heart races with excitement, your mind is clouded with desire, and your judgment is thrown out the window. It\'s that moment when you know you\'re in deep trouble, but you just can\'t help yourself. It\'s a mix of passion, recklessness, and a dash of insanity that culminates in a tumultuous whirlwind of emotions. In simpler terms, it\'s like willingly walking into a hurricane of emotions without an umbrella. Enjoy the ride!