-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
client = OpenAI(api_key = "API-KEY")
chat_completion = client.chat.completions.create(
messages=[
{
"role": "user",
"content": "Say this is a test",
}
],
model="gpt-3.5-turbo",
)
Gives an Error on Colab
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 chat_completion = client.chat.completions.create(
2 messages=[
3 {
4 "role": "user",
5 "content": "Say this is a test",
AttributeError: 'function' object has no attribute 'completions'
`
Version: openai 1.12.0
To Reproduce
client = OpenAI(api_key = "API-KEY")
chat_completion = client.chat.completions.create(
messages=[
{
"role": "user",
"content": "Say this is a test",
}
],
model="gpt-3.5-turbo",
)
Code snippets
Already Attached
OS
linux
Python version
Python 3.11
Library version
openai v1.12.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working