Are you passing the test, the grader tests, because if you’re passing the tests, it means that you have the required solution? I’m not completely familiar with this course.
The file “helper_functions.py” contains both functions and they behave differently. The print_llm_response() prints the response from LLM, while get_llm_response() saves the response from LLM as a string. If you want to use the print_llm_resposne() function, you will need to do another import statement as this lab has so far only imported one specific function: the get_llm_response().
You can check out the code in helper_functions.py following the step below:
from the menu bar on the top of your notebook click:
file->open->helper_functions.py
What this exercise asks you to do is to write a prompt to get the LLM to look at Daniel’s email and give you information about his trip. If you use the get_llm_response() function, you will have to create a variable to store the information returned, and then print it out just like the previous code cells. If you use the print_llm_response(), you don’t need to do the extra step of printing the response, that function will include the printing step in addition to getting a response from the LLM.
However, if you use the print_llm_response(), you will need to add an import statement to import the print_llm_response() function as the first line of your code like this:
You can complete this exercise either using get_llm_response or print_llm_response.
I decide to do it using get_llm_response, the answer would look something like this:
prompt = f"List all of the activities that Daniel did on his trip. Trip details: {email}"
activities = get_llm_response(prompt)
print(activities)
But if you were to complete this exercise using print_llm_response, you’d first have to import the function, for which the solution could look like:
from helper_functions import print_llm_response
prompt = f"List all of the activities that Daniel did on his trip. Trip details: {email}"
print_llm_response(prompt)
The wording, Write code below to list all of the activities that Daniel did on his trip. You'll need to create a prompt and use either get_llm_responseorprint_llm_response. is correct and giving you the choice of the function you want to use.