電子郵件行銷的語氣調整
某家電商公司會定期寄送電子郵件行銷,推廣產品、通知新到貨,並提供專屬優惠。公司推測目前的寫作策略過於不正式,想測試調整郵件語氣是否能提升顧客互動率。
你的任務是撰寫一個能有效轉換行銷郵件語氣的提示。你會將所寫的提示套用到提供的 sample_email。
已為你預先載入 OpenAI 套件、sample_email 字串,以及 get_response() 函式。
本練習屬於課程
使用 OpenAI API 的提示工程
練習說明
- 撰寫一個提示,將
sample_email的語氣轉換為具備 專業、正向、且 以使用者為中心。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
client = OpenAI(api_key="")
# Craft a prompt to change the email's tone
prompt = ____
response = get_response(prompt)
print("Before transformation: \n", sample_email)
print("After transformation: \n", response)