Documentation
¶
Index ¶
- Variables
- type ApiVersion
- type Classification
- type ClassificationLabel
- type ClassificationLabelConfidence
- type DetectLanguageResult
- type Document
- type EmbedModel
- type Example
- type Extractiveness
- type Generation
- type LogitBias
- type Meta
- type Model
- type RerankModel
- type RerankResult
- type ReturnLikelihoods
- type TextFormat
- type TextLength
- type TokenLikelihood
- type Truncate
Constants ¶
This section is empty.
Variables ¶
View Source
var EmbedModelsSize = map[EmbedModel]int{ EmbedModelEnglishLightV20: 1024, EmbedModelEnglishV20: 4096, EmbedModelMultilingualV20: 768, }
Functions ¶
This section is empty.
Types ¶
type ApiVersion ¶
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 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 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 Meta ¶
type Meta struct {
ApiVersion ApiVersion `json:"api_version"`
Warnings []string `json:"warnings"`
}
type RerankModel ¶
type RerankModel string
const ( RerankModelEnglishV20 RerankModel = "rerank-english-v2.0" RerankModelMultilingualV20 RerankModel = "rerank-multilingual-v2.0" )
type RerankResult ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.