Class EmotionSettingEntity

java.lang.Object
com.bytedesk.core.base.BaseEntity
com.bytedesk.kbase.settings_emotion.EmotionSettingEntity
All Implemented Interfaces:
Serializable

@Entity public class EmotionSettingEntity extends BaseEntity
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      private String name
      设置名称,用于区分不同的情绪分析设置模板
    • description

      private String description
      设置描述
    • robotUid

      private String robotUid
      关联robot entity uid,用于调用LLM大模型进行情绪分析
    • defaultTemplate

      private Boolean defaultTemplate
      是否为默认设置模板
    • enabled

      private Boolean enabled
      是否启用情绪分析
    • executionTiming

      private String executionTiming
      执行时机 - ON_MESSAGE: 收到新消息时 - THREAD_END: 会话结束时
    • triggerScope

      private String triggerScope
      触发范围 - VISITOR_ONLY: 仅访客消息 - AGENT_ONLY: 仅客服消息 - ALL: 所有非系统消息
    • triggerEveryNMessages

      private Integer triggerEveryNMessages
      触发频率:每隔 N 条消息触发一次 - 1 表示每条消息都触发
    • triggerCooldownSeconds

      private Integer triggerCooldownSeconds
      触发冷却时间(秒):上次触发后,冷却未结束则跳过
    • triggerCooldownOnly

      private Boolean triggerCooldownOnly
      是否仅按时间冷却触发(忽略 triggerEveryNMessages)
    • emotionList

      private List<String> emotionList
      情绪分类选项
    • confidenceThreshold

      private Double confidenceThreshold
      情绪信心度阈值,低于该阈值的情绪分析结果将被认为是不确定的 范围:0-1,例如0.75表示75%的置信度
    • emotionTriggers

      private String emotionTriggers
      情绪分析触发条件 格式:{"触发条件1": "值1", "触发条件2": "值2"} 例如:{"message_length": "10", "keyword_match": "true"}
    • emotionHandlers

      private String emotionHandlers
      情绪对应的处理策略 格式:{"情绪1": "处理策略1", "情绪2": "处理策略2"} 例如:{"满意": "normal", "不满意": "escalate"}
    • negativeEmotionHandling

      private String negativeEmotionHandling
      负面情绪的处理方式 TRANSFER_HUMAN: 转人工 ESCALATE: 升级处理 OFFER_HELP: 主动提供帮助
    • negativeEmotionTip

      private String negativeEmotionTip
      负面情绪检测到时的提示消息
    • emotionTags

      private String emotionTags
      情绪标签,用于对情绪进行分组和归类 格式:{"情绪1": ["标签1", "标签2"], "情绪2": ["标签3", "标签4"]}
    • emotionWeights

      private String emotionWeights
      情绪权重配置,用于计算综合情绪分数 格式:{"情绪1": 1.0, "情绪2": 0.8, "情绪3": 0.6}
    • enableEmotionTracking

      private Boolean enableEmotionTracking
      是否启用情绪跟踪,跟踪用户情绪的变化趋势
    • emotionSwitchThreshold

      private Double emotionSwitchThreshold
      情绪转换阈值,当新情绪的置信度超过此阈值时才会转换当前情绪
  • Constructor Details

    • EmotionSettingEntity

      public EmotionSettingEntity()
  • Method Details

    • fromRequest

      public static EmotionSettingEntity fromRequest(EmotionSettingRequest request, org.modelmapper.ModelMapper modelMapper)
      从 EmotionSettingRequest 创建 EmotionSetting 实体 如果 request 为 null,返回默认构建的实体
      Parameters:
      request - EmotionSettingRequest 对象,可以为 null
      modelMapper - ModelMapper 实例用于字段映射
      Returns:
      EmotionSetting 实体,永远不为 null