1234567891011121314151617181920212223242526272829 |
- package v1
- import "github.com/gogf/gf/v2/frame/g"
- type ChatReq struct {
- g.Meta `path:"/chat" tags:"聊天请求" method:"post" summary:"AI聊天"`
- Role string `json:"role" v:"required"`
- Content string `json:"content" v:"required"`
- ConversationID string `json:"conversation_id"`
- MessageId string `json:"message_id"`
- }
- type ChatRes struct {
- g.Meta `mime:"application/json" example:"json"`
- Text string `json:"text"`
- ConversationID string `json:"conversation_id"`
- MessageId string `json:"message_id"`
- }
- type ChatStreamReq struct {
- g.Meta `path:"/chatStream" tags:"聊天请求流传输" method:"post" summary:"AI聊天流传输"`
- Role string `json:"role" v:"required"`
- Content string `json:"content" v:"required"`
- ConversationID string `json:"conversation_id" doc:"这个一个会话ID唯一值"`
- MessageId string `json:"message_id,omitempty" doc:"这个一个消息ID用于保持上下文"`
- }
- type ChatStreamRes struct {
- }
|