ChatSseMessage.java 658 B

12345678910111213141516171819202122232425
  1. package com.backendsys.modules.ai.chat.entity;
  2. import lombok.AllArgsConstructor;
  3. import lombok.Data;
  4. import lombok.NoArgsConstructor;
  5. @Data
  6. public class ChatSseMessage {
  7. private String content;
  8. private String content_type; // (LOADING: 加载中, REPLY: 回复, THINK: 思考)
  9. private Long duration;
  10. public ChatSseMessage(String contentType, String content) {
  11. this.content = content;
  12. this.content_type = contentType;
  13. }
  14. public ChatSseMessage(String contentType, String content, Long duration) {
  15. this.content = content;
  16. this.content_type = contentType;
  17. this.duration = duration;
  18. }
  19. }