Multi-step prompt to plan a trip
You noticed that the single-step prompt was not effective, because the answer was too vague for what you had in mind. You improve your prompt by specifying the steps to follow for planning. The plan should have four potential locations for your beach vacation, and each location should have some accommodation options, some activities, and an evaluation of the pros and cons.
The OpenAI package and the get_response() function have been pre-loaded for you.
The get_response() function in this exercise employs the max_tokens parameter to help this exercise run faster. This may truncate your solution.
Deze oefening maakt deel uit van de cursus
Prompt Engineering with the OpenAI API
Oefeninstructies
- Create a multi-step
promptasking the model to make a plan for a beach vacation, which should include: four potential locations, each with some accommodation options, some activities, and an evaluation of the pros and cons.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
client = OpenAI(api_key="")
# Create a prompt detailing steps to plan the trip
prompt = """____"""
response = get_response(prompt)
print(response)