Skip to content
# Start coding here...
import openai
import os
openai.api_key = "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"
openai.Model.retrieve("gpt-3.5-turbo")
messages = []
system_message = "Researcher"
messages.append({"role":"system","content":system_message})
message = "How can I use the @ mentions in chatgpt using the api to create multiple AI personalities?."
messages.append({"role":"user","content": message})
response=openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=messages
)
reply = response["choices"][0]["message"]["content"]
print(reply)