Documentation
¶
Index ¶
Constants ¶
View Source
const (
ContentTypeJSON = "application/json"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶ added in v1.1.0
type Chat struct {
Message string `json:"message"`
Model model.Model `json:"model,omitempty"`
Stream bool `json:"stream,omitempty"`
PreambleOverride string `json:"preamble_override,omitempty"`
ChatHistory []model.ChatMessage `json:"chat_history,omitempty"`
ConversationID string `json:"conversation_id,omitempty"`
PromptTruncation model.PromptTruncation `json:"prompt_truncation,omitempty"`
Connectors []model.Connector `json:"connectors,omitempty"`
SearchQueryOnly bool `json:"search_query_only,omitempty"`
Documents []model.Document `json:"documents,omitempty"`
CitationQuality model.CitationQuality `json:"citation_quality,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
FrequencyPenalty *float64 `json:"frequency_penalty,omitempty"`
PresencePenalty *float64 `json:"presence_penalty,omitempty"`
}
func (*Chat) ContentType ¶ added in v1.1.0
type Classify ¶
type Classify struct {
Inputs []string `json:"inputs"`
Examples []model.Example `json:"examples,omitempty"`
Model *model.EmbedModel `json:"model,omitempty"`
Preset *string `json:"preset,omitempty"`
Truncate *model.Truncate `json:"truncate,omitempty"`
}
func (*Classify) ContentType ¶
type DetectLanguage ¶
type DetectLanguage struct {
Texts []string `json:"texts"`
}
func (*DetectLanguage) ContentType ¶
func (d *DetectLanguage) ContentType() string
func (*DetectLanguage) Path ¶
func (d *DetectLanguage) Path() (string, error)
type Detokenize ¶
type Detokenize struct {
Tokens []int64 `json:"tokens"`
Model *model.Model `json:"model,omitempty"`
}
func (*Detokenize) ContentType ¶
func (d *Detokenize) ContentType() string
func (*Detokenize) Path ¶
func (d *Detokenize) Path() (string, error)
type Embed ¶
type Embed struct {
Texts []string `json:"texts"`
Model model.EmbedModel `json:"model,omitempty"`
InputType *model.EmbedInputType `json:"input_type,omitempty"`
Truncate *model.Truncate `json:"truncate,omitempty"`
}
func (*Embed) ContentType ¶
type Generate ¶
type Generate struct {
Prompt string `json:"prompt"`
Model *model.Model `json:"model,omitempty"`
NumGenerations *int `json:"num_generations,omitempty"`
MaxTokens *int `json:"max_tokens,omitempty"`
Preset *string `json:"preset,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
K *int `json:"k,omitempty"`
P *float64 `json:"p,omitempty"`
FrequencyPenalty *float64 `json:"frequency_penalty,omitempty"`
PresencePenalty *float64 `json:"presence_penalty,omitempty"`
EndSequences []string `json:"end_sequences,omitempty"`
StopSequences []string `json:"stop_sequences,omitempty"`
ReturnLikelihoods *model.ReturnLikelihoods `json:"return_likelihoods,omitempty"`
LogitBias model.LogitBias `json:"logit_bias,omitempty"`
Truncate *model.Truncate `json:"truncate,omitempty"`
Stream bool `json:"stream,omitempty"`
}
func (*Generate) ContentType ¶
type Rerank ¶
type Rerank struct {
Query string `json:"query"`
Model *model.RerankModel `json:"model,omitempty"`
Documents []string `json:"documents"`
TopN *int `json:"top_n,omitempty"`
ReturnDocuments bool `json:"return_documents"`
MaxChunksPerDoc *int `json:"max_chunks_per_doc,omitempty"`
}
func (*Rerank) ContentType ¶
type Summarize ¶
type Summarize struct {
Text string `json:"text"`
Length *model.TextLength `json:"length,omitempty"`
Format *model.TextFormat `json:"format,omitempty"`
Model *model.Model `json:"model,omitempty"`
Extractiveness *model.Extractiveness `json:"extractiveness,omitempty"`
Temperature *float64 `json:"temperature,omitempty"`
AdditionalCommand *string `json:"additional_command,omitempty"`
}
func (*Summarize) ContentType ¶
type Tokenize ¶
func (*Tokenize) ContentType ¶
Click to show internal directories.
Click to hide internal directories.