46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
package dto
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
type LoginReq struct {
|
|
g.Meta `path:"/login" method:"post" tags:"系统配置" summary:"访问令牌登录"`
|
|
Token string `v:"required" json:"token"`
|
|
}
|
|
|
|
type LoginRes struct {
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
type GetSystemConfigReq struct {
|
|
g.Meta `path:"/" method:"get" tags:"系统配置" summary:"获取系统设置"`
|
|
}
|
|
|
|
type GetSystemConfigRes struct {
|
|
DefaultChatModel int64 `json:"default_chat_model"`
|
|
DefaultDataset int64 `json:"default_dataset"`
|
|
}
|
|
|
|
type UpdateSystemConfigReq struct {
|
|
g.Meta `path:"/" method:"put" tags:"系统配置" summary:"更新系统设置"`
|
|
DefaultChatModel int64 `json:"default_chat_model"`
|
|
DefaultDataset int64 `json:"default_dataset"`
|
|
}
|
|
|
|
type UpdateSystemConfigRes struct{}
|
|
|
|
type RegenerateTokenReq struct {
|
|
g.Meta `path:"/regenerate-token" method:"post" tags:"系统配置" summary:"重新生成访问令牌"`
|
|
}
|
|
|
|
type RegenerateTokenRes struct {
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
type GetTokenReq struct {
|
|
g.Meta `path:"/token" method:"get" tags:"系统配置" summary:"获取当前访问令牌"`
|
|
}
|
|
|
|
type GetTokenRes struct {
|
|
Token string `json:"token"`
|
|
}
|