s_chat_message.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package schema
  2. import "time"
  3. // ChatMessage ChatMessage对象
  4. type ChatMessage struct {
  5. RecordID string `json:"record_id"` // 记录id
  6. UserId string `json:"user_id"` // 用户id
  7. AssistantId string `json:"assistant_id"` // 助手id
  8. SessionId string `json:"session_id"` // 会话id
  9. RagSessionId string `json:"rag_session_id"` // rag_session_id
  10. Question string `json:"question"` // 对话问题
  11. Answer string `json:"answer"` // 对话答案
  12. CreatedAt time.Time `json:"created_at"` // 创建时间
  13. CreatorId string `json:"creator_id"` // 创建人id
  14. }
  15. // ChatMessageQueryParam 查询条件
  16. type ChatMessageQueryParam struct {
  17. AssistantId string
  18. SessionId string
  19. LikeName string
  20. RecordIDs []string
  21. }
  22. // ChatMessageQueryOptions ChatMessage对象查询可选参数项
  23. type ChatMessageQueryOptions struct {
  24. PageParam *PaginationParam // 分页参数
  25. }
  26. type ChatMessages []*ChatMessage
  27. // ChatMessageQueryResult ChatMessage对象查询结果
  28. type ChatMessageQueryResult struct {
  29. Data ChatMessages
  30. PageResult *PaginationResult
  31. }