In the chatcompletions tutorial, this code is used:
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."},
{"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."}
]
)
print(completion.choices[0].message)
I’m trying to understand why we are using capitlisation on the O, and AI - here OpenAI in the import statement. In other documentation I’ve seen and even when I’ve asked ChatGPT what the correct capitlisation should be, it seems it used to be openai, i.e. from openai import openai
however, that seems to have changed, as the documentation above suggests, and this code runs fine.
How comes this changed? did it change? I thought these import statements were usually lower case? why is this using a combination of upper and lowercase? curious to learn.
Thanks