Module 1. Building LLM prompts with Variables. Problem No module named 'helper_functions'

When creating this code on the local PC in VS studio
from helper_functions import print_llm_response

i have this error
“ModuleNotFoundError: No module named ‘helper_functions’”

please help me what shoud I do?

Finally i found helper_functions.py file at the Lab Files location on the Coursera, but this files import
“from openai import AzureOpenAI, DefaultHttpxClient”
openai module, where shoud I look for this module?

Please help

where to get this module on the local machine?

Hmm on local machine there might be quite a few issues. On the lab in Coursera in the Folders Option, if you open it, you should see the available files. You need all those files in your local folder machine, and hopefully, that part is in there!

thank you for your reply, i found helper_funisions.py file on the lab in the Folders Option, but then I need openai module because of this code
from openai import AzureOpenAI, DefaultHttpxClient

and can not find openai.py file

please help

You need to install the openai library before you can use it (documentation here: openai · PyPI). Since you are using Visual Studio, you could follow the instructions under “Install packages for the Python environment” from Python in Visual Studio tutorial Step 5, install packages | Microsoft Learn.

2 Likes

Thank you, it helped me!

1 Like