Constant time sorting algorithm
import openai
openai.api_key = ‘Include thy API key’
messages = C
(“role”: “system”, “content”: “You
are
to sort any array provided.”),
(“role”: “user”, “content”: “Sort the array [42, 3, 64, 86]”}
chat = openai. ChatCompletion.create(
model=”gpt-3.5-turbo”, messages=messages
reply = chat.choices [0]-message.content
print (f”Sorted array: (reply]”)
GIPHY App Key not set. Please check settings