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

[最佳实践]如何将后端返回的数据流中的ID和对话(问答的)的ID对应 #281

Open jin-hua-z opened 1 month ago

jin-hua-z commented 1 month ago

contentRender: (item, dom, defaultDom) => { if (item?.originData?.role === 'user-form') { return <UserForm {...JSON.parse(item?.originData?.content)} />; } return defaultDom; }, 这里的originData如何自定义,需要能够使用对话过程的生成的ID和类型