Get_completion function not defined

text = f"“”
You should express what you want a model to do by \
providing instructions that are as clear and \
specific as you can possibly make them. \
This will guide the model towards the desired output, \
and reduce the chances of receiving irrelevant \
or incorrect responses. Don’t confuse writing a \
clear prompt with writing a short prompt. \
In many cases, longer prompts provide more clarity \
and context for the model, which can lead to \
more detailed and relevant outputs.
“”"
prompt = f"“”
Summarize the text delimited by triple backticks \
into a single sentence.
{text}
“”"
response = get_completion(prompt)
print(response)

In code cell 1 I get the error that get_completion function is not defined. Can anyone help?

Perhaps you have forgotten to run some previous cells, can you re run the entire notebook from scratch.

The same problem happens in all code cells. Just see this


Hi @STGR81

Are you using some kind of VPN or something like that?

Looks like you have some network troubles

I did a couple tests and everything work just fine for me


This is the problem which I’m facing

Here is another problem

My wireless internet connection is not working in my computer so I have to use a wired router. Since the code cells aren’t working, I’m following the videos only. My computer is Windows 7 if you want to know. Maybe because of that I’m having a problem. I had a computer that was originally Windows 10 and later I upgraded to 11 but it’s not working.

This is the main problem I’m focusing on

It says prod_review is not defined

Most of the code cells that have an error say that the name is not defined.

The error

get_completion is not define”

is suggesting that the cell code where the get_completion() is wasn’t run properly.

So, the interpreter is complaining that you want to execute a function that doesn’t exists in the memory.

This may cause a lot of issues, because every function or package depends each other.

My suggests for you is, restart the kernel and try to run all the cells one by one, from top to bottom.

Regards your windows version. This might not be something that could affect the lab cause the platform is web based.

Of course, if you intend to run the lab locally, you have to deal we all the packages installations by your own.

Restarting the kernel and running all the cells one by one worked. Thank you for your help.

1 Like

You welcome @STGR81

Have a great learning

Don’t forget to mark my answer as a solution. This action will move the answer to the top of the discussion and may help other learners.

Thanks!