ant-design / pro-chat

🤖 Components Library for Quickly Building LLM Chat Interfaces.
https://pro-chat.antdigital.dev
MIT License
667 stars 83 forks source link

🐛[BUG]1.12.2 版本,设置了userMeta={{avatar:'/u_avatar.svg',title:"VIP顾客"}},但对话头像上方不展示别名 #163

Closed BarronLin closed 5 months ago

BarronLin commented 5 months ago

🐛 bug 描述

1.12.2 版本,设置了userMeta={{avatar:'/u_avatar.svg',title:"VIP顾客"}},但对话头像上方不展示别名

📷 复现步骤

设置userMeta={{avatar:'/u_avatar.svg',title:"VIP顾客"}}

💻 复现代码

  <ProChat
    request={'http://localhost:8086/chat/stream'}
    config={{
        model:"ERNIE-Speed-8K",
        params:{
            user:"user-123456"
        }
    }}
    helloMessage={
      '欢迎使用 ProChat ,我是你的专属机器人,这是我们的 Github:[ProChat](https://github.com/ant-design/pro-chat)'
    }
    userMeta={{avatar:'/u_avatar.svg',title:"VIP顾客"}}
    assistantMeta={{ avatar: '/logo.svg', title: '小A客服' }}
    inputAreaProps={{
        autoCompleteProps: {
          placement: 'topRight',
        },
    }}
  />

© 版本信息

🚑 其他信息

image
ONLY-yours commented 5 months ago

@BarronLin 需要你手动加入 showTitle 参数

现在默认 Title 是不主动展示的

BarronLin commented 5 months ago

😯是的,看到了 要 加showTitle

zhanyeye commented 1 month ago

加在这里,方便后来人

image