visitor.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // TVisitorAgent 访客详情
  2. // agentId (string, optional):
  3. import { TContentType, TMessageBody } from "./bot"
  4. // 访客的会话详情
  5. export type TVisitorChat = {
  6. agentId: string ,
  7. content: string // 对方消息内容 ,
  8. contentType: TContentType // 消息类型:text/plain; application/json; aiseek/audio_chunk; aiseek/thinking; aiseek/function_call; aiseek/multimodal; aiseek/qa; ,
  9. correctionAnswer: string // 纠错回答内容 ,
  10. correctionId :number // 纠错记录ID ,
  11. correctionLinks: string[] // 纠错链接 ,
  12. correctionPics: string[] // 纠错图片 ,
  13. correctionTime :string // 纠错时间 ,
  14. dislikeReason :string // 差评原因 ,
  15. isDislike: boolean // 差评状态 ,
  16. isLike: boolean // 点赞状态 ,
  17. isStreaming: boolean // 该消息是否还正处理流式返回中 ,
  18. msgId :number // 记录ID ,
  19. msgTime :string // 消息时间 ,
  20. msgUk :string // 消息唯一值,由前端生成的UUID ,
  21. role :string // 角色:system/user/assistant/function/tool ,
  22. visitorId: number// 会话用户对应的访客记录ID
  23. body?: TMessageBody
  24. }
  25. export type TVisitorMessage = {
  26. agentId: string,
  27. visitorId: string,
  28. content: string,
  29. dislikeReason: string,
  30. isDislike: false,
  31. isLike: false,
  32. isStreaming: false,
  33. msgId: number,
  34. msgTime: string,
  35. msgUk: string,
  36. originalAgentId: string,
  37. role: string
  38. }
  39. export type TVisitorAgent = {
  40. address?: string|null
  41. email?: string
  42. agentId: string, // 访客智能体ID -- 如果客户的所有智能体都无效时,则可能为 null ,
  43. agentStatus: string, // agentStatus (string, optional): 访客智能体状态 -- normal 正常/ deleted 已删除 ,
  44. avatarLogo?: string|null, // avatarUrl (string, optional): 访客头像地址 ,
  45. avatarUrl?: string|null, // avatarUrl (string, optional): 访客头像地址 ,
  46. chatRound: number, // chatRound (integer, optional): 会话轮数 ,
  47. dislikeCnt: number,// dislikeCnt (integer, optional): 差评数 ,
  48. isEnt: false, // isEnt (boolean, optional): 是否企业认证联系人 ,
  49. lastChatTime: string,// lastChatTime (string, optional): 最新的对话时间 ,
  50. myAgentId: string, // myAgentId (string, optional): 访问我的智能体ID ,
  51. myAgentName: string,// myAgentName (string, optional): 访问我的智能体名称 ,
  52. isNewEnt: boolean
  53. isDefault: boolean
  54. mobile?: string
  55. name: string, // name (string, optional): 访客名称 -- 最后一次访问的快照信息 ,
  56. entName?: string|null, // name (string, optional): 访客名称 -- 最后一次访问的快照信息 ,
  57. entId?: string|null, // name (string, optional): 访客名称 -- 最后一次访问的快照信息 ,
  58. position?: string|null,// position (string, optional): 访客职位 ,
  59. qrCodeUrl?: string|null,// position (string, optional): 访客职位 ,
  60. visitTimes: number,// visitTimes (integer, optional): 访问访问我的指定智能体次数 ,
  61. visitorId: number// visitorId (integer, optional): 访客ID
  62. }
  63. export type TSessionItem = {
  64. chatRoundCnt: number,
  65. msgTime: string,
  66. chatSecondsDesc: string
  67. chatSeconds: number
  68. sessionId: string
  69. visitTimes?: number
  70. }