openai

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigInstance

func ConfigInstance() interface{}

func GetConfig

func GetConfig(connection *plugin.Connection) openaiConfig

func Plugin

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

Types

type CompletionRequestQual

type CompletionRequestQual struct {
	Model            *string        `json:"model"`
	Prompt           *string        `json:"prompt,omitempty"`
	Suffix           *string        `json:"suffix,omitempty"`
	MaxTokens        *int           `json:"max_tokens,omitempty"`
	Temperature      *float32       `json:"temperature,omitempty"`
	TopP             *float32       `json:"top_p,omitempty"`
	N                *int           `json:"n,omitempty"`
	Stream           *bool          `json:"stream,omitempty"`
	LogProbs         *int           `json:"logprobs,omitempty"`
	Stop             []string       `json:"stop,omitempty"`
	PresencePenalty  *float32       `json:"presence_penalty,omitempty"`
	FrequencyPenalty *float32       `json:"frequency_penalty,omitempty"`
	BestOf           *int           `json:"best_of,omitempty"`
	LogitBias        map[string]int `json:"logit_bias,omitempty"`
	User             *string        `json:"user,omitempty"`
}

type CompletionRow

type CompletionRow struct {
	Completion   string
	Prompt       string
	Index        int
	FinishReason string
	LogProbs     *openai.LogProbs
}

type OrganizationInfo added in v0.4.0

type OrganizationInfo struct {
	Object      string `json:"object"`
	OrgId       string `json:"id"`
	Created     int64  `json:"created"`
	Title       string `json:"title"`
	Name        string `json:"name"`
	Personal    bool   `json:"personal"`
	ParentOrgId string `json:"parent_org_id"`
}

type Profile added in v0.4.0

type Profile struct {
	UserID    string `json:"id"`
	FirstName string `json:"name"`
	Email     string `json:"email"`
	Orgs      struct {
		Data []OrganizationInfo `json:"data"`
	} `json:"orgs"`
}

Profile represents the structure of our profile data.

Jump to

Keyboard shortcuts

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