Documentation
¶
Index ¶
- func GetAIAnswer(as AnswerSetter, userID string, url, model string, aiType ctype.AiType, ...)
- func GroupPointDtos[T IPointDto](pointDTOs []PointDto, predicate func(T) bool) []T
- func ParsePointDto(pointDTOs []PointDto) (videoDTOs []PointVideoDto, workDTOs []PointWorkDto, ...)
- type Account
- type AnswerSetter
- type ChannelItem
- type ChoiceQue
- type ExamTurn
- type FillQue
- type IAttachment
- type IPointDto
- type JudgeQue
- type PointDocumentDto
- type PointDto
- type PointVideoDto
- type PointWorkDto
- type Question
- type Session
- type ShortQue
- type UserEntity
- type WorkInputField
- type XueXiTCourse
- type XueXiTCourseJson
- type YingHuaExamTopic
- type YingHuaExamTopics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAIAnswer ¶ added in v1.4.9
func GetAIAnswer(as AnswerSetter, userID string, url, model string, aiType ctype.AiType, aiChatMessages aiq.AIChatMessages, apiKey string)
func GroupPointDtos ¶ added in v1.7.8
func ParsePointDto ¶ added in v1.0.9
func ParsePointDto(pointDTOs []PointDto) (videoDTOs []PointVideoDto, workDTOs []PointWorkDto, documentDTOs []PointDocumentDto)
Types ¶
type AnswerSetter ¶ added in v1.4.9
type AnswerSetter interface {
SetAnswers([]string)
}
type ChannelItem ¶
type ChannelItem struct {
Cfid int `json:"cfid"`
Norder int `json:"norder"`
CataName string `json:"cataName"`
Cataid string `json:"cataid"`
Id int `json:"id"`
Cpi int `json:"cpi"`
Key any `json:"key"`
Content struct {
Studentcount int `json:"studentcount"`
Chatid string `json:"chatid"`
IsFiled int `json:"isFiled"`
Isthirdaq int `json:"isthirdaq"`
Isstart bool `json:"isstart"`
Isretire int `json:"isretire"`
Name string `json:"name"`
Course struct {
Data []struct {
BelongSchoolId string `json:"belongSchoolId"`
Coursestate int `json:"coursestate"`
Teacherfactor string `json:"teacherfactor"`
IsCourseSquare int `json:"isCourseSquare"`
Schools string `json:"schools"`
CourseSquareUrl string `json:"courseSquareUrl"`
Imageurl string `json:"imageurl"`
AppInfo string `json:"appInfo"`
Name string `json:"name"`
DefaultShowCatalog int `json:"defaultShowCatalog"`
Id int `json:"id"`
AppData int `json:"appData"`
} `json:"data"`
} `json:"course"`
Roletype int `json:"roletype"`
Id int `json:"id"`
State int `json:"state"`
Cpi int `json:"cpi"`
Bbsid string `json:"bbsid"`
IsSquare int `json:"isSquare"`
} `json:"content"`
Topsign int `json:"topsign"`
}
ChannelItem 课程列表
type ChoiceQue ¶ added in v1.3.0
type ChoiceQue struct {
Type qtype.QueType
Qid string //题目ID
Text string
Options map[string]string
Answers []string // 答案
}
ChoiceQue 选择类型
func (*ChoiceQue) AnswerAIGet ¶ added in v1.3.0
func (q *ChoiceQue) AnswerAIGet(userID, url, model string, aiType ctype.AiType, aiChatMessages aiq.AIChatMessages, apiKey string)
AnswerAIGet ChoiceQue的AI回答获取方法
func (*ChoiceQue) SetAnswers ¶ added in v1.4.9
type ExamTurn ¶ added in v1.3.0
type ExamTurn struct {
XueXChoiceQue ChoiceQue
XueXJudgeQue JudgeQue
XueXFillQue FillQue
XueXShortQue ShortQue
YingHuaExamTopic
}
type FillQue ¶ added in v1.4.5
type FillQue struct {
Type qtype.QueType
Qid string
Text string
OpFromAnswer map[string][]string // 位置与答案
}
FillQue 填空类型
func (*FillQue) AnswerAIGet ¶ added in v1.4.9
func (q *FillQue) AnswerAIGet(userID, url, model string, aiType ctype.AiType, aiChatMessages aiq.AIChatMessages, apiKey string)
AnswerAIGet FillQue的AI回答获取方法
func (*FillQue) SetAnswers ¶ added in v1.4.9
type IAttachment ¶ added in v1.0.6
type JudgeQue ¶ added in v1.4.2
type JudgeQue struct {
Type qtype.QueType
Qid string //题目ID
Text string
Options map[string]string
Answers []string // 答案
}
JudgeQue 判断类型
func (*JudgeQue) AnswerAIGet ¶ added in v1.4.9
func (q *JudgeQue) AnswerAIGet(userID, url, model string, aiType ctype.AiType, aiChatMessages aiq.AIChatMessages, apiKey string)
AnswerAIGet JudgeQue的AI回答获取方法
func (*JudgeQue) SetAnswers ¶ added in v1.4.9
type PointDocumentDto ¶ added in v1.0.6
type PointDocumentDto struct {
CardIndex int
CourseID string
ClassID string
KnowledgeID int
Cpi string
ObjectID string
Title string
JobID string
Jtoken string
Type ctype.CardType
IsSet bool
}
PointDocumentDto 文档查看任务点
func (*PointDocumentDto) AttachmentsDetection ¶ added in v1.2.0
func (p *PointDocumentDto) AttachmentsDetection(attachment interface{}) (bool, error)
func (PointDocumentDto) GetType ¶ added in v1.7.8
func (d PointDocumentDto) GetType() ctype.CardType
func (PointDocumentDto) IsSetted ¶ added in v1.7.8
func (d PointDocumentDto) IsSetted() bool
type PointDto ¶ added in v1.0.6
type PointDto struct {
PointVideoDto
PointWorkDto
PointDocumentDto
}
type PointVideoDto ¶ added in v1.0.6
type PointVideoDto struct {
CardIndex int
CourseID string
ClassID string
KnowledgeID int
Cpi string
ObjectID string
// 从SSR视图中获取
IsPassed bool
FID int
DToken string
PlayTime int
Duration int
JobID string
OtherInfo string
Title string
RT float64
VideoFaceCaptureEnc string
RandomCaptureTime string //大概的下次人脸时间
AttDurationEnc string
Enc string
Logger *log.Logger
PUID string
Mid string
Session *Session
Type ctype.CardType
IsSet bool
Attachment interface{} //视图获取后的原始map
}
PointVideoDto 视频任务点
func (*PointVideoDto) AttachmentsDetection ¶ added in v1.0.6
func (p *PointVideoDto) AttachmentsDetection(attachment interface{}) (bool, error)
AttachmentsDetection 使用接口对每种DTO进行检测再次赋值, 以对应后续的刷取请求
func (PointVideoDto) GetType ¶ added in v1.7.8
func (v PointVideoDto) GetType() ctype.CardType
func (PointVideoDto) IsSetted ¶ added in v1.7.8
func (v PointVideoDto) IsSetted() bool
type PointWorkDto ¶ added in v1.0.6
type PointWorkDto struct {
CardIndex int
CourseID string
ClassID string
KnowledgeID int
Cpi string
WorkID string
SchoolID string
JobID string
PUID string
KToken string
Enc string
Type ctype.CardType
IsSet bool
}
PointWorkDto 测验任务点
func (*PointWorkDto) AttachmentsDetection ¶ added in v1.0.9
func (p *PointWorkDto) AttachmentsDetection(attachment interface{}) (bool, error)
func (PointWorkDto) GetType ¶ added in v1.7.8
func (w PointWorkDto) GetType() ctype.CardType
func (PointWorkDto) IsSetted ¶ added in v1.7.8
func (w PointWorkDto) IsSetted() bool
type Question ¶ added in v1.3.0
type Question struct {
Title string //试卷标题
Cpi string
JobId string
WorkId string
ClassId string
CourseId string
Ua string
FormType string
SaveStatus string
Version string
Tempsave string
PyFlag string
UserId string
Knowledgeid string
OldWorkId string //最原始作业id
FullScore string //满分是多少
OldSchoolId string //原始作业单位id
Api string //api值
WorkRelationId string
Enc_work string
Isphone string
RandomOptions string
WorkAnswerId string
AnswerId string
TotalQuestionNum string
Choice []ChoiceQue //选择类型
Judge []JudgeQue //判断类型
Fill []FillQue //填空类型
Short []ShortQue //简答类型
}
Question TODO 这里考虑是否在其中直接将答案做出 直接上报提交 或 保存提交
type ShortQue ¶ added in v1.6.1
简答类型
func (*ShortQue) AnswerAIGet ¶ added in v1.6.1
func (q *ShortQue) AnswerAIGet(userID, url, model string, aiType ctype.AiType, aiChatMessages aiq.AIChatMessages, apiKey string)
AnswerAIGet ShortQue的AI回答获取方法
func (*ShortQue) SetAnswers ¶ added in v1.6.1
type UserEntity ¶
type WorkInputField ¶ added in v1.1.2
type WorkInputField struct {
Name string
Value string
Type string // Optional: to store the type attribute if needed
ID string // Store the id attribute if present
}
WorkInputField represents an <input> element in the HTML form.
type XueXiTCourse ¶
type XueXiTCourse struct {
CourseName string //课程名称
ClassId string //classId
CourseId string //课程Id
Cpi string //不知道是啥玩意,反正需要
PersonId string //个人Id
UserId string //UserId
}
XueXiTCourse 关键信息过滤截取最终的实体
type XueXiTCourseJson ¶
type XueXiTCourseJson struct {
Result int `json:"result"`
Msg string `json:"msg"`
ChannelList []ChannelItem `json:"channelList"`
Mcode string `json:"mcode"`
Createcourse int `json:"createcoursed"`
TeacherEndCourse int `json:"teacherEndCourse"`
ShowEndCourse int `json:"showEndCourse"`
HasMore bool `json:"hasMore"`
StuEndCourse int `json:"stuEndCourse"`
}
XueXiTCourse 课程所有信息
type YingHuaExamTopic ¶ added in v1.3.0
type YingHuaExamTopic struct {
AnswerId string `json:"answerId"`
Index string `json:"index"`
Source string `json:"source"`
qentity.Question
}
ExamTopic represents a single exam question
type YingHuaExamTopics ¶ added in v1.3.0
type YingHuaExamTopics struct {
YingHuaExamTopics map[string]YingHuaExamTopic
}
ExamTopics holds a map of ExamTopic indexed by answerId
Click to show internal directories.
Click to hide internal directories.