models

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModelAda                 = "ada"
	ModelBabbage             = "babbage"
	ModelDavinci             = "davinci"
	ModelTextDavinci003      = "text-davinci-003"
	ModelTextDavinci002      = "text-davinci-002"
	ModelTextDavinci001      = "text-davinci-001"
	ModelCurieInstructBeta   = "curie-instruct-beta"
	ModelCodeCushman001      = "code-cushman-001"
	ModelTextAda001          = "text-ada-001"
	ModelTextCurie001        = "text-curie-001"
	ModelCodeDavinci002      = "code-davinci-002"
	ModelDavinciInstructBeta = "davinci-instruct-beta"
	ModelTextBabbage001      = "text-babbage-001"
	ModelCurie               = "curie"

	ModelTextDavinciEdit001 = "text-davinci-edit-001"
	ModelCodeDavinciEdit001 = "code-davinci-edit-001"

	ModelTextEmbeddingAda002 = "text-embedding-ada-002"

	ModelTextModeration001 = "text-moderation-001"

	ModelGPT4                  = "gpt-4"
	ModelGPT4_0314             = "gpt-4-0314"
	ModelGPT4_32K              = "gpt-4-32k"
	ModelGPT4_32K_0314         = "gpt-4-32k-0314"
	ModelGPT4_0613             = "gpt-4-0613"
	ModelGPT4_32K_0613         = "gpt-4-32k-0613"
	ModelGPT3_5_Turbo          = "gpt-3.5-turbo"
	ModelGPT3_5_Turbo_0301     = "gpt-3.5-turbo-0301"
	ModelGPT3_5_Turbo_16K      = "gpt-3.5-turbo-16k"
	ModelGPT3_5_Turbo_16K_0613 = "gpt-3.5-turbo-16k-0613"
)

* Some frequently-used model name

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteResponse

type DeleteResponse struct {
	ID      string `json:"id"`
	Object  string `json:"object"`
	Deleted bool   `json:"deleted"`
}

type ListResponse

type ListResponse struct {
	Data   []*Model `json:"data"`
	Object string   `json:"object"`
}

type Model

type Model struct {
	ID         string        `json:"id"`
	Object     string        `json:"object"`
	OwnedBy    string        `json:"owned_by"`
	Created    int64         `json:"created"`
	Root       string        `json:"root"`
	Parent     interface{}   `json:"parent"` //FIXME: don't know what it is
	Permission []*Permission `json:"permission"`
}

type ModelClient

type ModelClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c *api.Client) *ModelClient

func (*ModelClient) Delete

func (c *ModelClient) Delete(id string) (*DeleteResponse, error)

* Delete a fine-tuned model. You must have the Owner role in your organization.

func (*ModelClient) List

func (c *ModelClient) List() (*ListResponse, error)

* Lists the currently available models, and provides basic information about each one such as the owner and availability.

func (*ModelClient) Retrieve

func (c *ModelClient) Retrieve(name string) (*Model, error)

* Retrieves a model instance, providing basic information about the model such as the owner and permissioning. * name: The ID of the model to use for this request

type Permission

type Permission struct {
	ID                 string      `json:"id"`
	Object             string      `json:"object"`
	Created            int64       `json:"created"`
	AllowCreateEngine  bool        `json:"allow_create_engine"`
	AllowSampling      bool        `json:"allow_sampling"`
	AllowLogprobs      bool        `json:"allow_logprobs"`
	AllowSearchIndices bool        `json:"allow_search_indices"`
	AllowView          bool        `json:"allow_view"`
	AllowFineTuning    bool        `json:"allow_fine_tuning"`
	Organization       string      `json:"organization"`
	IsBlocking         bool        `json:"is_blocking"`
	Group              interface{} `json:"group"` // FIXME: don't know what it is.
}

Jump to

Keyboard shortcuts

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