Files
st-react/server/model/app/request/conversation.go
2026-02-28 15:09:40 +08:00

37 lines
1.3 KiB
Go

package request
// CreateConversationRequest 创建对话请求
type CreateConversationRequest struct {
CharacterID uint `json:"characterId" binding:"required"`
Title string `json:"title" binding:"max=200"`
PresetID *uint `json:"presetId"`
WorldbookID *uint `json:"worldbookId"`
WorldbookEnabled bool `json:"worldbookEnabled"`
AIProvider string `json:"aiProvider" binding:"omitempty,oneof=openai anthropic"`
Model string `json:"model"`
}
// SendMessageRequest 发送消息请求
type SendMessageRequest struct {
Content string `json:"content" binding:"required"`
}
// GetConversationListRequest 获取对话列表请求
type GetConversationListRequest struct {
Page int `form:"page" binding:"min=1"`
PageSize int `form:"pageSize" binding:"min=1,max=100"`
}
// GetMessageListRequest 获取消息列表请求
type GetMessageListRequest struct {
Page int `form:"page" binding:"min=1"`
PageSize int `form:"pageSize" binding:"min=1,max=100"`
}
// UpdateConversationSettingsRequest 更新对话设置请求
type UpdateConversationSettingsRequest struct {
Settings map[string]interface{} `json:"settings"`
WorldbookID *uint `json:"worldbookId"`
WorldbookEnabled *bool `json:"worldbookEnabled"`
}