request

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRun

type BaseRun struct {
	Prompt string `json:"prompt" form:"prompt" validate:"required"`
}

type CodeGenerate

type CodeGenerate struct {
	Prompt string `json:"prompt" form:"prompt" validate:"required"`
	Num    int    `json:"n" form:"num"`
	Lang   string `json:"lang" form:"lang"`
}

type ConversationList

type ConversationList struct {
	models.PageInfo
}

type ConversationRun

type ConversationRun struct {
	ConversationId string `json:"conversationId" form:"conversationId" validate:"required,uuid"`
	ParentMsgId    string `json:"parentMsgId,omitempty" form:"parentMsgId"`
	Role           string `json:"role" form:"role" validate:"required"`
	Content        string `json:"content" form:"content" validate:"required"`
	ContentType    string `json:"contentType" form:"contentType" validate:"required"`
	LLM            string `json:"llm" form:"llm" validate:"required"`
	Model          string `json:"models" form:"models"`
	Stream         bool   `json:"stream" form:"stream" validate:"required"`
}

type ConversationWS

type ConversationWS struct {
	Command string `json:"command"`
	Prompt  string `json:"prompt"`
}

type JwtCustomClaims

type JwtCustomClaims struct {
	UserName    string `json:"userName"`
	RoleKeyword string `json:"roleKeyword"`
	RoleSort    uint   `json:"roleSort"`
	jwt.RegisteredClaims
}

JwtCustomClaims are custom claims extending default ones

type LLMList

type LLMList struct {
	models.PageInfo
}

type MessageFeedback

type MessageFeedback struct {
	ConversationId string `json:"conversationId" form:"conversationId" validate:"required,uuid"`
	MessageId      string `json:"messageId" form:"conversationId" validate:"required,uuid"`
	Feedback       uint   `json:"feedback" form:"feedback" validate:"required"`
}

type ReqDelete

type ReqDelete struct {
	Ids string `json:"ids" form:"ids"`
}

type RoleCreate

type RoleCreate struct {
	Name    string `json:"name" form:"name" validate:"required"`
	Keyword string `json:"keyword" form:"keyword" validate:"required"`
	Sort    *uint  `json:"sort" form:"sort" validate:"required"`
	Desc    string `json:"desc" form:"desc"`
	Status  *uint  `json:"status" form:"status"`
	Creator string `json:"creator" form:"creator"`
}

type RoleList

type RoleList struct {
	Name            string `json:"name" form:"name"`
	Keyword         string `json:"keyword" form:"keyword"`
	Status          *uint  `json:"status" form:"status"`
	CurrentRoleSort uint   `json:"currentRoleSort"`
	models.PageInfo
}

type RoleUpdate

type RoleUpdate struct {
	Name    string `json:"name"`
	Keyword string `json:"keyword"`
	Sort    *uint  `json:"sort"`
	Desc    string `json:"desc"`
	Status  uint   `json:"status"`
	Creator string `json:"creator"`
}

type UserCreate

type UserCreate struct {
	Username string `json:"username" form:"username" validate:"required"`
	ZhName   string `json:"zhName" form:"zhName" validate:"required"`
	Email    string `json:"email" form:"email"`
	Status   uint   `json:"status,omitempty" form:"status"`
	RoleId   uint   `json:"roleId" form:"roleId" validate:"required"`
}

func (*UserCreate) FieldTrans

func (c *UserCreate) FieldTrans() map[string]string

FieldTrans translates the name of the field that needs to be verified

type UserList

type UserList struct {
	CurrentRoleSort uint
	Username        string `json:"username" form:"username"`
	ZhName          string `json:"zhName" form:"zhName"`
	Email           string `json:"email" form:"email"`
	Status          *uint  `json:"status" form:"status"`
	models.PageInfo
}

type UserLogin

type UserLogin struct {
	Username string `json:"username" form:"username"`
	Password string `json:"password" form:"password"`
}

UserLogin represents user authentication request body

type UserUpdate

type UserUpdate struct {
	Status *uint `json:"status"`
	RoleId uint  `json:"roleId" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL