# Error: NotFound: 404 POST

**URL:** <https://community.deeplearning.ai/t/error-notfound-404-post/691075>\
**Category:** Pair Programming with a Large Language Model\
**Created:** [September 11, 2024, 2:53pm UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075 "2024-09-11T14:53:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![asieh\_harati](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@asieh\_harati](https://community.deeplearning.ai/u/asieh_harati)\
**Post date:** [September 11, 2024, 2:53pm UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075/1 "2024-09-11T14:53:33Z")

</div>

I’m running the notebook in the course console and I get this error when I run `completion = generate_text(prompt)`

`NotFound: 404 POST http://jupyter-api-proxy.internal.dlai/rev-proxy/google_generative_ai/v1beta2/models/text-bison-001:generateText?%24alt=json%3Benum-encoding%3Dint: Requested entity was not found. `

---

<div class="post-metadata">

**Author:** ![jacck.in.dev](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jacck.in.dev](https://community.deeplearning.ai/u/jacck.in.dev)\
**Post date:** [September 26, 2024, 12:37pm UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075/2 "2024-09-26T12:37:22Z")

</div>

Looks like the course content is not up-to-date, and some of the libraries and tools are being decomissioned.

As a workaround, I’m following the quick-start from gemini api in a Colab notebook and it’s being util.

Pd. Be aware that you may need to tweak a little be the code shown in the video to make it work with the new gemini-ai library.

 ![image](https://global.discourse-cdn.com/dlai/original/3X/c/d/cdec4ca047108187136a92a9d1bb0f2bd1dc778b.png)

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/178017_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [September 26, 2024, 7:06pm UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075/3 "2024-09-26T19:06:53Z")

</div>

@lesly.zerna can you please check into this.

Regards  
DP

---

<div class="post-metadata">

**Author:** ![lesly.zerna](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/lesly.zerna/32/47465_2.png) [@lesly.zerna](https://community.deeplearning.ai/u/lesly.zerna)\
**Post date:** [September 30, 2024, 2:40pm UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075/4 "2024-09-30T14:40:50Z")

</div>

Hi [asieh\_harati](https://community.deeplearning.ai/u/asieh_harati)!  
thank you for reporting this! We’re actually working in updating these notebooks due to the recent updates in the Google LLMs!  
While we’re working on this and have it ready (I’ll notify you here! 🙂)  
Give a check to this Short Course about using [Multimodality with Gemini](https://www.deeplearning.ai/short-courses/large-multimodal-model-prompting-with-gemini/)

Happy Learning!

---

<div class="post-metadata">

**Author:** ![asieh\_harati](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@asieh\_harati](https://community.deeplearning.ai/u/asieh_harati)\
**Post date:** [October 11, 2024, 3:05pm UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075/5 "2024-10-11T15:05:47Z")

</div>

Thanks @lesly.zerna

---

<div class="post-metadata">

**Author:** ![MarkieMark](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@MarkieMark](https://community.deeplearning.ai/u/MarkieMark)\
**Post date:** [October 17, 2024, 9:44am UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075/6 "2024-10-17T09:44:50Z")

</div>

just to add to help whoever may land here while waiting for the update

1 Unless you have already, you’ll need an API key from Google aistudio apikey page (aistudio dot google dot com/app/apikey ; can’t include links)

2 you’ll need to `pip install` the current `google-generativeai` in the environment that you run a copy of the notebook in; similarly make your API key accessible

3 (even though we’ll be using Gemini – for simplicity not renaming `palm` variable in the notebook to the more current `genai` found in the Google docs) the `configure()` call changes to

```auto
palm.configure(
    api_key=get_api_key(),
    transport="rest"
)

```

4 (similarly, for relative simplicity, not renaming the `_bison` model, the model is

```auto
model_bison = palm.GenerativeModel("gemini-1.5-flash")

```

5 `generate_text()` function changes to

```auto
def generate_text(prompt,
                  model=model_bison,
                  temperature=0.0):
    return model.generate_content(prompt,
                                  generation_config={'temperature':temperature})

```

6 `print(completion.result)` changes to `print(completion.text)`

HTH

Attached file ([L4-technical\_debt\_202410.ipynb](https://community.deeplearning.ai/uploads/short-url/ahfl2oY4qeFZ4iyBAFR35trwk1K.ipynb) (18.1 KB)) is L4 with variables renamed; NB `get_api_key()` needs to return your valid API key, while `google.generativeai` import should be current pip `google-generativeai`)

---

<div class="post-metadata">

**Author:** ![lesly.zerna](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/lesly.zerna/32/47465_2.png) [@lesly.zerna](https://community.deeplearning.ai/u/lesly.zerna)\
**Post date:** [November 11, 2024, 3:18pm UTC](https://community.deeplearning.ai/t/error-notfound-404-post/691075/7 "2024-11-11T15:18:15Z")

</div>

Thank you for your patience!  
The Short course has already been updated with the Gemini API since PaLM API is deprecated.  
Give it a check please! [Pair Programming with a Large Language Model - DeepLearning.AI](https://learn.deeplearning.ai/courses/pair-programming-llm/lesson/1/introduction)
