Documentation ¶
Index ¶
- Variables
- func ConfigInstance() interface{}
- func GetConfig(connection *plugin.Connection) cohereConfig
- func Plugin(ctx context.Context) *plugin.Plugin
- type ClassificationRequestQual
- type ClassificationRow
- type DetectLanguageRequestQual
- type DetectLanguageRow
- type DetokenizeRequestQual
- type DetokenizeRow
- type EmbedRequestQual
- type EmbedRow
- type GenerationRequestQual
- type GenerationRow
- type SummarizeRequestQual
- type SummarizeRow
- type TokenizeRequestQual
- type TokenizeRow
Constants ¶
This section is empty.
Variables ¶
var ConfigSchema = map[string]*schema.Attribute{ "api_key": { Type: schema.TypeString, }, }
Functions ¶
func ConfigInstance ¶
func ConfigInstance() interface{}
func GetConfig ¶
func GetConfig(connection *plugin.Connection) cohereConfig
Types ¶
type ClassificationRequestQual ¶
type ClassificationRequestQual struct { Model *string `json:"model,omitempty"` Inputs *[]string `json:"inputs,omitempty"` Examples *[]coherego.Example `json:"examples,omitempty"` Preset *string `json:"preset,omitempty"` Truncate string `json:"truncate,omitempty"` }
ClassificationRequestQual defines the structure of the settings qual
type ClassificationRow ¶
type ClassificationRow struct { coherego.Classification Input []string }
ClassificationRow defines the row structure returned from the API
type DetectLanguageRequestQual ¶
type DetectLanguageRequestQual struct {
Texts []string `json:"texts"`
}
DetectLanguageRequestQual defines the structure of the settings qual
type DetectLanguageRow ¶
type DetectLanguageRow struct { coherego.LanguageDetectResult Texts []string Text string }
DetectLanguageRow defines the row structure returned from the API
type DetokenizeRequestQual ¶
type DetokenizeRequestQual struct {
Tokens []int64 `json:"tokens"`
}
DetokenizeRequestQual defines the structure of the settings qual
type DetokenizeRow ¶
DetokenizeRow defines the row structure returned from the API
type EmbedRequestQual ¶
type EmbedRequestQual struct { Model *string `json:"model,omitempty"` Texts *[]string `json:"texts,omitempty"` Truncate *string `json:"truncate,omitempty"` }
EmbedRequestQual defines the structure of the settings qual
type GenerationRequestQual ¶
type GenerationRequestQual struct { Model *string `json:"model,omitempty"` Prompt *string `json:"prompt,omitempty"` MaxTokens *uint `json:"max_tokens,omitempty"` NumGenerations *int `json:"num_generations,omitempty"` Temperature *float64 `json:"temperature,omitempty"` TopP *float64 `json:"top_p,omitempty"` FrequencyPenalty *float64 `json:"frequency_penalty,omitempty"` PresencePenalty *float64 `json:"presence_penalty,omitempty"` Stop []string `json:"stop,omitempty"` Preset string `json:"preset,omitempty"` ReturnLikelihoods *string `json:"return_likelihoods,omitempty"` }
GenerationRequestQual defines the structure of the settings qual
type GenerationRow ¶
type GenerationRow struct { coherego.Generation Prompt string }
GenerationRow defines the row structure returned from the API
type SummarizeRequestQual ¶
type SummarizeRequestQual struct { Text *string `json:"text,omitempty"` Format *string `json:"format,omitempty"` Length *string `json:"length,omitempty"` Extractiveness *string `json:"extractiveness,omitempty"` Temperature *float64 `json:"temperature,omitempty"` AdditionalCommand *string `json:"additional_command,omitempty"` Model *string `json:"model,omitempty"` }
SummarizeRequestQual defines the structure of the settings qual
type SummarizeRow ¶
type SummarizeRow struct { coherego.SummarizeResponse Text string }
SummarizeRow defines the row structure returned from the API
type TokenizeRequestQual ¶
type TokenizeRequestQual struct {
Text *string `json:"text,omitempty"`
}
CompletionRequestQual defines the structure of the settings qual
type TokenizeRow ¶
type TokenizeRow struct { Tokens coherego.TokenizeResponse Text string }
SummarizeRow defines the row structure returned from the API