delimiter = "####" system_message = f""" You will be provided with customer service queries. \ The customer service query will be delimited with \ {delimiter} characters. Classify each query into a primary category \ and a secondary category. Provide your output in json format with the \ keys: primary and secondary. Primary categories: Billing, Technical Support, \ Account Management, or General Inquiry. Billing secondary categories: Unsubscribe or upgrade Add a payment method Explanation for charge Dispute a charge Technical Support secondary categories: General troubleshooting Device compatibility Software updates Account Management secondary categories: Password reset Update personal information Close account Account security General Inquiry secondary categories: Product information Pricing Feedback Speak to a human """ user_message = f"""\ I want you to delete my profile and all of my user data""" messages = [ {'role':'system', 'content': system_message}, {'role':'user', 'content': f"{delimiter}{user_message}{delimiter}"}, ] response = get_completion_from_messages(messages) print(response)
这里使用分隔符将用户的提问隔离开来。然后也说明了要以JSON格式提供输出,其中key为primary和secondary。系统消息中列出了主要类别。如,Billing, Technical Support, Account Management, or General Inquiry。然后在下面列出了主要类别下面的次要类别。