mirror of
http://112.124.100.131/ebiz-ai/ebiz-base-ai.git
synced 2025-12-06 17:36:48 +08:00
feat(AI): 添加产品推荐和知识问答场景的初始消息- 在开始新对话时,根据 action 类型发送不同的初始消息- 添加产品推荐小助手和产品知识小助手的欢迎语和指导信息-优化了对话开始的逻辑,提高了用户体验
This commit is contained in:
@@ -166,7 +166,33 @@ export default {
|
||||
startNewConversation() {
|
||||
this.cancelSend()
|
||||
this.$emit('initBotMessage')
|
||||
this.$emit('update:messages', [])
|
||||
if (this.action === 'product_recommend') {
|
||||
this.$emit('update:messages', [
|
||||
{
|
||||
type: 'bot',
|
||||
text: `这里是产品推荐小助手,请告诉我以下客户的信息, 我帮您精准推荐:\n\n1.如果您需要推荐保障类产品,您可以告诉我以下信息:
|
||||
\n\n• 客户需要哪类保障?(重疾/医疗/意外)
|
||||
\n\n• 客户的年龄、性别、有无既往病症
|
||||
\n\n• 客户的保障场景(住院医疗/百万医疗/出行意外/综合意外/交通意外)
|
||||
\n\n2.如果您需要推荐理财储蓄类产品,您可以告诉我以下信息:
|
||||
\n\n• 客户主要目标是什么?(财富升值/子女教育/资产传承/养老保障)
|
||||
\n\n• 客户的年龄、性别、年收入、风险承受能力`,
|
||||
messageEnd: true,
|
||||
},
|
||||
])
|
||||
}
|
||||
|
||||
if (this.action === 'chat') {
|
||||
this.$emit('update:messages', [
|
||||
{
|
||||
type: 'bot',
|
||||
text: `这里是产品知识小助手,请告诉我您想要了解哪个产品?也可以输入以下信息,我帮您进行精准查询:\n\n1.投保规则\n\n2.保障责任\n\n3.增值服务\n\n您可以直接向我提问~`,
|
||||
messageEnd: true,
|
||||
},
|
||||
])
|
||||
}
|
||||
|
||||
// this.$emit('update:messages', [])
|
||||
this.$emit('update:conversationId', '')
|
||||
this.$emit('update:productName', '')
|
||||
this.$emit('update:messageStatus', 'stop')
|
||||
|
||||
Reference in New Issue
Block a user