model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 0 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ApiVersion

type ApiVersion struct {
	Version        string `json:"version"`
	IsDeprecated   bool   `json:"is_deprecated"`
	IsExperimental bool   `json:"is_experimental"`
}

type Classification

type Classification struct {
	ID         string              `json:"id"`
	Input      *string             `json:"input,omitempty"`
	Prediction string              `json:"prediction"`
	Confidence float64             `json:"confidence"`
	Labels     ClassificationLabel `json:"labels"`
}

type ClassificationLabel

type ClassificationLabel map[string]ClassificationLabelConfidence

type ClassificationLabelConfidence

type ClassificationLabelConfidence struct {
	Confidence float64 `json:"confidence"`
}

type DetectLanguageResult

type DetectLanguageResult struct {
	LanguageName string `json:"language_name"`
	LanguageCode string `json:"language_code"`
}

type Document

type Document struct {
	Text string `json:"text"`
}

type EmbedModel

type EmbedModel string
const (
	EmbedModelEnglishLightV20 EmbedModel = "embed-english-light-v2.0"
	EmbedModelMultilingualV20 EmbedModel = "embed-multilingual-v2.0"
	EmbedModelEnglishV20      EmbedModel = "embed-english-v2.0"
)

type Example

type Example struct {
	Text  string `json:"text"`
	Label string `json:"label"`
}

type Extractiveness

type Extractiveness string
const (
	ExtractivenessLow    Extractiveness = "low"
	ExtractivenessMedium Extractiveness = "medium"
	ExtractivenessHigh   Extractiveness = "high"
	ExtractivenessAuto   Extractiveness = "auto"
)

type Generation

type Generation struct {
	ID               string            `json:"id"`
	Text             string            `json:"text"`
	Index            *int              `json:"index,omitempty"`
	Likelihood       *float64          `json:"likelihood,omitempty"`
	TokenLikelihoods []TokenLikelihood `json:"token_likelihoods,omitempty"`
}

type LogitBias

type LogitBias map[string]float64

type Meta

type Meta struct {
	ApiVersion ApiVersion `json:"api_version"`
	Warnings   []string   `json:"warnings"`
}

type Model

type Model string
const (
	ModelCommand             Model = "command"
	ModelCommandNightly      Model = "command-nightly"
	ModelCommandLight        Model = "command-light"
	ModelCommandLightNightly Model = "command-light-nightly"
)

type RerankModel

type RerankModel string
const (
	RerankModelEnglishV20      RerankModel = "rerank-english-v2.0"
	RerankModelMultilingualV20 RerankModel = "rerank-multilingual-v2.0"
)

type RerankResult

type RerankResult struct {
	Document       Document `json:"document"`
	Index          int64    `json:"index"`
	RelevanceScore float64  `json:"relevance_score"`
}

type ReturnLikelihoods

type ReturnLikelihoods string
const (
	ReturnLikelihoodsGeneration ReturnLikelihoods = "GENERATION"
	ReturnLikelihoodsAll        ReturnLikelihoods = "ALL"
	ReturnLikelihoodsNone       ReturnLikelihoods = "NONE"
)

type TextFormat

type TextFormat string
const (
	TextFormatParagraph TextFormat = "paragraph"
	TextFormatBullet    TextFormat = "bullet"
	TextFormatAuto      TextFormat = "auto"
)

type TextLength

type TextLength string
const (
	TextLengthShort  TextLength = "short"
	TextLengthMedium TextLength = "medium"
	TextLengthLong   TextLength = "long"
	TextLengthAuto   TextLength = "auto"
)

type TokenLikelihood

type TokenLikelihood struct {
	Token      string  `json:"token"`
	Likelihood float64 `json:"likelihood"`
}

type Truncate

type Truncate string
const (
	TruncateNone  Truncate = "NONE"
	TruncateStart Truncate = "START"
	TruncateEnd   Truncate = "END"
)

Jump to

Keyboard shortcuts

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