model

package
v0.1.0-beta.31 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	AnswerKey     []string `json:"answerKey"`     // 如果传了选项可以格式化为ABCD
	AnswerKeyText string   `json:"answerKeyText"` // 答案ABCD文本 分隔符默认是 #

	AnswerIndex []int  `json:"answerIndex"` // 如果用户传了options 将会自动帮用户计算出答案的角标,依据Answer来计算的
	AnswerText  string `json:"answerText"`  // 答案文本 分隔符默认是 #

	BestAnswer []string   `json:"bestAnswer"` // 最有可能的答案
	AllAnswer  [][]string `json:"allAnswer"`  // 所有接口聚合的答案
}

Answer 答案 该实体只会增加而不会减少

type Question

type Question struct {
	Question string   `json:"question"`
	Options  []string `json:"options"`
	Type     uint     `json:"type"`
	Answer   []string `json:"answer"`
}

Question 最简单的通用问题答案模型

type SearchRequest

type SearchRequest struct {
	QID      string   `json:"qid"`
	Plat     int      `json:"plat"`
	Question string   `json:"question"`
	Options  []string `json:"options"`
	Type     int      `json:"type"`

	CourseName string `json:"courseName"`

	Extra string `json:"extra"`
}

SearchRequest 搜题的请求体

type SearchResponse

type SearchResponse struct {
	Plat     int      `json:"plat"`
	Question string   `json:"question"`
	Options  []string `json:"options"`
	Type     int      `json:"type"`
	Answer   Answer   `json:"answer"` // 最相似,最可能的答案->即moreAnswer中出现最多的答案
}

SearchResponse 搜题响应体

Jump to

Keyboard shortcuts

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