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.
Bu egzersiz
Prompt Engineering with the OpenAI API
kursunun bir parçasıdırEgzersiz talimatları
- 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.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
client = OpenAI(api_key="")
# Create a prompt detailing steps to plan the trip
prompt = """____"""
response = get_response(prompt)
print(response)