cohere

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func Plugin

func Plugin(ctx context.Context) *plugin.Plugin

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

type DetokenizeRow struct {
	Text   string
	Tokens []int64
}

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 EmbedRow

type EmbedRow struct {
	Embeddings []float64
	Texts      []string
	Text       string
}

EmbedRow defines the row structure returned from the API

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

Jump to

Keyboard shortcuts

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