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"` Preamble string `json:"preamble,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"` MaxTokens *int `json:"max_tokens,omitempty"` MaxInputTokens *int `json:"max_input_tokens,omitempty"` K *int `json:"k,omitempty"` P *float64 `json:"p,omitempty"` Seed *float64 `json:"seed,omitempty"` StopSequences []string `json:"stop_sequences,omitempty"` FrequencyPenalty *float64 `json:"frequency_penalty,omitempty"` PresencePenalty *float64 `json:"presence_penalty,omitempty"` Tools []model.Tool `json:"tools,omitempty"` ToolResults []model.ToolResult `json:"tool_results,omitempty"` ForceSingleStep bool `json:"force_single_step,omitempty"` }
func (*Chat) ContentType ¶ added in v1.1.0
type CheckAPIKey ¶ added in v1.2.0
type CheckAPIKey struct { }
func (*CheckAPIKey) ContentType ¶ added in v1.2.0
func (r *CheckAPIKey) ContentType() string
func (*CheckAPIKey) Path ¶ added in v1.2.0
func (r *CheckAPIKey) Path() (string, error)
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 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 ListModels ¶ added in v1.2.0
type ListModels struct { PageSize int `json:"-"` PageToken string `json:"-"` Endpoint string `json:"-"` DefaultOnly bool `json:"-"` }
func (*ListModels) ContentType ¶ added in v1.2.0
func (c *ListModels) ContentType() string
func (*ListModels) Encode ¶ added in v1.2.0
func (c *ListModels) Encode() (io.Reader, error)
nolint: nilnil
func (*ListModels) Path ¶ added in v1.2.0
func (c *ListModels) Path() (string, error)
type Model ¶ added in v1.2.0
func (*Model) ContentType ¶ added in v1.2.0
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"` RankFields []string `json:"rank_fields,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.