# Is it me or everyone else? GPT api doesn't work any more

**URL:** https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220
**Category:** API
**Created:** [November 11, 2023, 2:46am UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220 "2023-11-11T02:46:30Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![will007](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/will007/32/147191_2.png) [@will007](https://community.openai.com/u/will007)
#### Post date: [November 11, 2023, 2:46am UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/1 "2023-11-11T02:46:30Z")

</div>

it always gives me this, and I follow the document it still doesn’t work.

APIRemovedInV1:

You tried to access openai.Completion, but this is no longer supported in openai\>=1.0.0 - see the README at [GitHub - openai/openai-python: The official Python library for the OpenAI API](https://github.com/openai/openai-python) for the API.

You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface.

Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`

A detailed migration guide is available here: [v1.0.0 Migration Guide · openai/openai-python · Discussion #742 · GitHub](https://github.com/openai/openai-python/discussions/742)

---

<div class="post-metadata">

### Author: ![g11920.keshan](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/g11920.keshan/32/244488_2.png) [@g11920.keshan](https://community.openai.com/u/g11920.keshan)
#### Post date: [November 11, 2023, 7:42am UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/2 "2023-11-11T07:42:11Z")

</div>

Same here, lloking for a solution ASAP

---

<div class="post-metadata">

### Author: ![koshilasandaru](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@koshilasandaru](https://community.openai.com/u/koshilasandaru)
#### Post date: [November 13, 2023, 6:27am UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/3 "2023-11-13T06:27:20Z")

</div>

Same over here its working locally but after creating the docker image this error occurs, is there a solution yet?

---

<div class="post-metadata">

### Author: ![pq8tmhx6k6](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@pq8tmhx6k6](https://community.openai.com/u/pq8tmhx6k6)
#### Post date: [November 13, 2023, 3:00pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/4 "2023-11-13T15:00:42Z")

</div>

I have the same error… found an answer yet?

---

<div class="post-metadata">

### Author: ![will007](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/will007/32/147191_2.png) [@will007](https://community.openai.com/u/will007)
#### Post date: [November 13, 2023, 10:34pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/5 "2023-11-13T22:34:56Z")

</div>

![image](https://us1.discourse-cdn.com/openai1/original/3X/a/6/a6f786f3c35e7b5c06f220d76a2a6c5393079af1.png)  
 ![image](https://us1.discourse-cdn.com/openai1/original/3X/7/3/73cafb5b77c60adb1d3f9f1728e49003c56309c4.png)

do this guys, you need to strictly follow the guide [GitHub - openai/openai-python: The official Python library for the OpenAI API](https://github.com/openai/openai-python)

[v1.0.0 Migration Guide · openai/openai-python · Discussion #742 · GitHub](https://github.com/openai/openai-python/discussions/742)

---

<div class="post-metadata">

### Author: ![atebst1](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/atebst1/32/146318_2.png) [@atebst1](https://community.openai.com/u/atebst1)
#### Post date: [November 19, 2023, 5:49pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/6 "2023-11-19T17:49:24Z")

</div>

hi, i have it set as an env var for my app and still getting this error.

---

<div class="post-metadata">

### Author: ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/719663_2.png) [@\_j](https://community.openai.com/u/_j)
#### Post date: [November 19, 2023, 6:09pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/7 "2023-11-19T18:09:25Z")

</div>

```python
'''example completion with openai > 1.1'''
from openai import OpenAI
client = OpenAI()
prompt = "True or false: a banana is smaller than a lemon.\n\n"

response = client.completions.create(
    prompt=prompt,
    model="gpt-3.5-turbo-instruct",
    top_p=0.5, max_tokens=50,
    stream=True)
for part in response:
    print(part.choices[0].text or "")

```

> False

---

<div class="post-metadata">

### Author: ![atebst1](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/atebst1/32/146318_2.png) [@atebst1](https://community.openai.com/u/atebst1)
#### Post date: [November 19, 2023, 7:21pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/8 "2023-11-19T19:21:26Z")

</div>

It worked for me, thanks. Wasn’t referencing the message object under response

---

<div class="post-metadata">

### Author: ![paulkiragu621](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/paulkiragu621/32/166301_2.png) [@paulkiragu621](https://community.openai.com/u/paulkiragu621)
#### Post date: [November 20, 2023, 8:40pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/9 "2023-11-20T20:40:24Z")

</div>

You can alternatively run  
`openai migrate`  
This will automatically update all your existing old code.

---

<div class="post-metadata">

### Author: ![munashemuchinako741](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/munashemuchinako741/32/277303_2.png) [@munashemuchinako741](https://community.openai.com/u/munashemuchinako741)
#### Post date: [December 20, 2023, 8:56am UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/10 "2023-12-20T08:56:12Z")

</div>

i am still having the same issue here , please assist me on how i should get rid of it, which file should i edit to troubleshoot this problem?

---

<div class="post-metadata">

### Author: ![EricGT](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ericgt/32/20571_2.png) [@EricGT](https://community.openai.com/u/EricGT)
#### Post date: [December 20, 2023, 2:29pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/11 "2023-12-20T14:29:42Z")

</div>

@will007

As this topic has a selected [solution](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220), can it be closed?

---

<div class="post-metadata">

### Author: ![dilwolf](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/dilwolf/32/148205_2.png) [@dilwolf](https://community.openai.com/u/dilwolf)
#### Post date: [December 21, 2023, 5:50am UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/12 "2023-12-21T05:50:24Z")

</div>

It worked for me. I had problems with using " \* `openai.Completion.create()` → `client.completions.create()`"

Thanks

---

<div class="post-metadata">

### Author: ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/719663_2.png) [@\_j](https://community.openai.com/u/_j)
#### Post date: [December 21, 2023, 6:16am UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/13 "2023-12-21T06:16:30Z")

</div>

That’s great to hear! The code snippet above, mind you, is for `gpt-3.5-turbo-instruct`, a special “completion” model that operates a bit differently than the “chat” you may be expecting.

Here’s getting a response from the chat `gpt-3.5-turbo` AI with the latest Python openai library:

```auto
from openai import OpenAI
client = OpenAI()
system = [{"role": "system", "content": "You are HappyBot."}]
chat_history = [] # past user and assistant turns for AI memory
user = [{"role": "user", "content": "Are you fully operational?"}]
chat_completion = client.chat.completions.create(
  messages = system + chat_history + user,
  model="gpt-3.5-turbo",
  max_tokens=25, top_p=0.9,
  )
print(chat_completion.choices[0].message.content)

```

---

<div class="post-metadata">

### Author: ![EricGT](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ericgt/32/20571_2.png) [@EricGT](https://community.openai.com/u/EricGT)
#### Post date: [January 29, 2024, 4:07pm UTC](https://community.openai.com/t/is-it-me-or-everyone-else-gpt-api-doesnt-work-any-more/494220/14 "2024-01-29T16:07:16Z")

</div>


