domain

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	AIQuestionStatusStart = "start"
	AIQuestionStatusEnd   = "end"
)

Variables

View Source
var (
	BigmodelVQA           = BigmodelType(bigmodelVQA)
	BigmodelPanGu         = BigmodelType(bigmodelPanGu)
	BigmodelLuoJia        = BigmodelType(bigmodelLuoJia)
	BigmodelWuKong        = BigmodelType(bigmodelWuKong)
	BigmodelWuKong4Img    = BigmodelType(bigmodelWuKong4Img)
	BigmodelWuKongHF      = BigmodelType(bigmodelWuKongHF)
	BigmodelWuKongUser    = BigmodelType(bigmodelWuKongUser)
	BigmodelCodeGeex      = BigmodelType(bigmodelCodeGeex)
	BigmodelGenPicture    = BigmodelType(bigmodelGenPicture)
	BigmodelDescPicture   = BigmodelType(bigmodelDescPicture)
	BigmodelDescPictureHF = BigmodelType(bigmodelDescPictureHF)
	BigmodelAIDetector    = BigmodelType(bigmodelAIDetector)
	BigmodelBaiChuan      = BigmodelType(bigmodelBaiChuan)
	BigmodelGLM2          = BigmodelType(bigmodelGLM2)
	BigmodelLLAMA2        = BigmodelType(bigmodelLLAMA2)
	BigmodelSkyWork       = BigmodelType(bigmodelSkyWork)
	BigmodelIFlytekSpark  = BigmodelType(bigmodelIFlytekSpark)
)

Functions

This section is empty.

Types

type AIDetectorInput

type AIDetectorInput struct {
	Lang Lang
	Text AIDetectorText
}

ai detector

func (AIDetectorInput) IsTextLengthOK

func (r AIDetectorInput) IsTextLengthOK() bool

type AIDetectorText

type AIDetectorText interface {
	AIDetectorText() string
}

func NewAIDetectorText

func NewAIDetectorText(v string) (AIDetectorText, error)

type ApiInfo

type ApiInfo struct {
	Id       string
	Name     string
	Endpoint string
	Doc      types.URL
}

type BaiChuanInput

type BaiChuanInput struct {
	Text              BaiChuanText
	Sampling          bool
	TopK              TopK
	TopP              TopP
	Temperature       Temperature
	RepetitionPenalty RepetitionPenalty
}

BaiChuan

type BaiChuanText

type BaiChuanText interface {
	BaiChuanText() string
}

baichuan text

func NewBaiChuanText

func NewBaiChuanText(v string) (BaiChuanText, error)

type BigModelFinishedEvent

type BigModelFinishedEvent struct {
	Account      types.Account
	BigModelType BigmodelType
}

type BigModelStartedEvent

type BigModelStartedEvent struct {
	Account      types.Account
	BigModelType BigmodelType
}

type BigmodelType

type BigmodelType string

BigmodelType

type ChoiceQuestion

type ChoiceQuestion struct {
	Desc    string
	Answer  string
	Options []string
}

type CompletionQuestion

type CompletionQuestion struct {
	Desc   string
	Info   string
	Answer string
}

type Desc

type Desc interface {
	Desc() string
}

taichu

func NewDesc

func NewDesc(v string) (Desc, error)

type GLM2Input

type GLM2Input struct {
	Text              GLM2Text
	Sampling          bool
	History           []History
	TopK              TopK
	TopP              TopP
	Temperature       Temperature
	RepetitionPenalty RepetitionPenalty
}

glm2

type GLM2Text

type GLM2Text interface {
	GLM2Text() string
}

glm2 text

func NewGLM2Text

func NewGLM2Text(v string) (GLM2Text, error)

type GenPictureInput

type GenPictureInput struct {
	Desc Desc
}

taichu

type History

type History interface {
	History() [2]string
}

glm2 history

func NewHistory

func NewHistory(q, a string) (History, error)

type IFlytekSparkInput

type IFlytekSparkInput struct {
	Text              IFlytekSparkText
	Sampling          bool
	History           []History
	TopK              TopK
	TopP              TopP
	Temperature       Temperature
	RepetitionPenalty RepetitionPenalty
}

iflytekspark

type IFlytekSparkText

type IFlytekSparkText interface {
	IFlytekSparkText() string
}

iflytekspark text

func NewIFlytekSparkText

func NewIFlytekSparkText(v string) (IFlytekSparkText, error)

type LLAMA2Input

type LLAMA2Input struct {
	Text              LLAMA2Text
	Sampling          bool
	History           []History
	TopK              TopK
	TopP              TopP
	Temperature       Temperature
	RepetitionPenalty RepetitionPenalty
}

llama2

type LLAMA2Text

type LLAMA2Text interface {
	LLAMA2Text() string
}

llama2 text

func NewLLAMA2Text

func NewLLAMA2Text(v string) (LLAMA2Text, error)

type Lang

type Lang interface {
	Lang() string
	IsZH() bool
	IsEN() bool
}

func NewLang

func NewLang(v string) (Lang, error)

type LuoJiaRecord

type LuoJiaRecord struct {
	Id        string
	CreatedAt int64
}

type LuoJiaRecordIndex

type LuoJiaRecordIndex struct {
	User types.Account
	Id   string
}

type ModelName

type ModelName interface {
	ModelName() string
}

Model Name

func NewModelName

func NewModelName(v string) (ModelName, error)

type OBSPath

type OBSPath interface {
	OBSPath() string
	IsTempPath() bool
}

obspath

func NewOBSPath

func NewOBSPath(v string) (OBSPath, error)

type Question

type Question interface {
	Question() string
}

Question

func NewQuestion

func NewQuestion(v string) (Question, error)

type QuestionSubmission

type QuestionSubmission struct {
	Id      string
	Account types.Account
	Date    string
	Status  string
	Expiry  int64
	Score   int
	Times   int
	Version int
}

type QuestionSubmissionInfo

type QuestionSubmissionInfo struct {
	Account types.Account
	Score   int
}

type RepetitionPenalty

type RepetitionPenalty interface {
	RepetitionPenalty() float64
}

repetition penalty

func NewRepetitionPenalty

func NewRepetitionPenalty(v float64) (RepetitionPenalty, error)

type SkyWorkInput

type SkyWorkInput struct {
	Text              SkyWorkText
	Sampling          bool
	History           []History
	TopK              TopK
	TopP              TopP
	Temperature       Temperature
	RepetitionPenalty RepetitionPenalty
}

skywork 13b

type SkyWorkText

type SkyWorkText interface {
	SkyWorkText() string
}

skywork text

func NewSkyWorkText

func NewSkyWorkText(v string) (SkyWorkText, error)

type Temperature

type Temperature interface {
	Temperature() float64
}

temperature

func NewTemperature

func NewTemperature(v float64) (Temperature, error)

type TopK

type TopK interface {
	TopK() int
}

top k

func NewTopK

func NewTopK(v int) (TopK, error)

type TopP

type TopP interface {
	TopP() float64
}

top p

func NewTopP

func NewTopP(v float64) (TopP, error)

type UserApiRecord

type UserApiRecord struct {
	User      types.Account
	ModelName ModelName
	Enabled   bool
	ApplyAt   string
	UpdateAt  string
	Token     string
	Version   int
}

type UserLuoJiaRecord

type UserLuoJiaRecord struct {
	User types.Account

	LuoJiaRecord
}

luojia

type WuKongAsyncInferenceFinishEvent

type WuKongAsyncInferenceFinishEvent struct {
	Account types.Account
	TaskId  uint64
	Links   map[string]string
}

type WuKongAsyncTaskStartEvent

type WuKongAsyncTaskStartEvent struct {
	Account types.Account
	TaskId  uint64
}

type WuKongInferenceErrorEvent

type WuKongInferenceErrorEvent struct {
	Account types.Account
	TaskId  uint64
	ErrMsg  string
}

type WuKongInferenceStartEvent

type WuKongInferenceStartEvent struct {
	Account types.Account
	Desc    WuKongPictureDesc
	Style   string
	EsStyle string
}

type WuKongPicture

type WuKongPicture struct {
	Id        string
	Owner     types.Account
	OBSPath   OBSPath
	Level     WuKongPictureLevel
	Diggs     []string
	DiggCount int
	Version   int
	CreatedAt string

	WuKongPictureMeta
}

wukong

func (*WuKongPicture) IsOfficial

func (r *WuKongPicture) IsOfficial() bool

func (*WuKongPicture) SetDefaultDiggs

func (r *WuKongPicture) SetDefaultDiggs()

type WuKongPictureDesc

type WuKongPictureDesc interface {
	WuKongPictureDesc() string
}

WuKongPictureDesc

func NewWuKongPictureDesc

func NewWuKongPictureDesc(v string) (WuKongPictureDesc, error)

type WuKongPictureLevel

type WuKongPictureLevel interface {
	WuKongPictureLevel() string
	Int() int
	IsOfficial() bool
	IsHot() bool
}

wukong level

func NewWuKongPictureLevel

func NewWuKongPictureLevel(v string) WuKongPictureLevel

func NewWuKongPictureLevelByNum

func NewWuKongPictureLevelByNum(v int) WuKongPictureLevel

type WuKongPictureLikedEvent

type WuKongPictureLikedEvent struct {
	Account types.Account
}

type WuKongPictureMeta

type WuKongPictureMeta struct {
	Style string
	Desc  WuKongPictureDesc
}

type WuKongPicturePublicizedEvent

type WuKongPicturePublicizedEvent struct {
	Account types.Account
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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