Hi
Please, the following line of code is not working on my python.
from helper_functions import print_llm_response
How can I make it run as I am practicing with python 3.9.5.
Thanks.
Hi
Please, the following line of code is not working on my python.
from helper_functions import print_llm_response
How can I make it run as I am practicing with python 3.9.5.
Thanks.
Hi Idris, welcome to the community!
This thread is about “How to have helper_functions in Python”: How to have helper_functions in python.
I hope this solves your problem!
Hi Idris,
If you are running in your computer, make sure you have helper_functions download in your project folder or current working folder. To download helper_functions from course, go to file → open → (in jupyter) open helper functions (by double clicking) → file → download (to your working folder). hope it helps.
Many thanks for your reply.
I have downloaded the helper_functions.py file and placed it in the same folder with the practice files, but the following error message pop up after the running the code.
Traceback (most recent call last):
File “D:\My edX\AI for Python\llm_tutorial.py”, line 1, in
from helper_functions import print_llm_response
File “D:\My edX\AI for Python\helper_functions.py”, line 4, in
from openai import OpenAI
ModuleNotFoundError: No module named ‘openai’
How can I resolve this?
Thanks
Perhaps you are missing the openai package.
Please I need help on step by step process to resolve this. I want get this resolved before moving to the next course
Is the missing openai package a paid service?
Waiting for your prompt response.
Many thanks
I believe you can get the openai package from pypi, using pip.
Note that installing a DLAI course to run on your local platform is up to you. There are too many platforms and configurations for DLAI volunteers to give individual instructions.
Here you have the solution:
github - miqueasmd - AIPythonDeepLearningAI
Feel free to ask if you need anything else
Hi @miqueasmd,
Appreciate you sharing instructions on how to run things locally. Please note to not share any solution code of the assignments, as it is against the honour code.
Also, since you have taken the material from our (DeepLearning.AI) courses, don’t forget to cite/reference us
Thanks,
Mubsi
As this notebook was not working anymore, I created one here:
github - miqueasmd - AIPythonDeepLearningAI
Feel free to ask if you need anything else
Hi @Mubsi
As I had some problems and saw others experiencing similar issues, I decided to help by sharing some instructions.
I believe I am not sharing anything that violates the guidelines, but please let me know if you find anything that shouldn’t be there.
I have referenced DeepLearning.AI in the README.md
:
This project is inspired by the DeepLearning.AI courses. Please visit DeepLearning.AI for more information and resources.
Thanks a lot,
Miqueas
To run the helper functions outside jupyter notebooks you need the aisetup library.
You will need to install the library from your terminal first:
pip install aisetup
Then you will be able to import functions such as print_llm_response in your python scripts:
from aisetup import print_llm_response