Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrModelNotSupported = errors.New("model not supported") ErrEncodingNotSupported = errors.New("encoding not supported") )
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { GetName() string Encode(string) ([]uint, []string, error) Decode([]uint) (string, error) }
func ForModel ¶
ForModel returns a new instance of a Codec implementation based on the specified OpenAI model. If the specified model is not supported, an error is returned.
type Model ¶
type Model string
const ( O1Preview Model = "o1-preview" O1Mini Model = "o1-mini" GPT4o Model = "gpt-4o" GPT4 Model = "gpt-4" GPT35Turbo Model = "gpt-3.5-turbo" GPT35 Model = "gpt-3.5" TextEmbeddingAda002 Model = "text-embedding-ada-002" TextDavinci003 Model = "text-davinci-003" TextDavinci002 Model = "text-davinci-002" CodeDavinci002 Model = "code-davinci-002" CodeDavinci001 Model = "code-davinci-001" CodeCushman002 Model = "code-cushman-002" CodeCushman001 Model = "code-cushman-001" DavinciCodex Model = "davinci-codex" CushmanCodex Model = "cushman-codex" TextDavinci001 Model = "text-davinci-001" TextCurie001 Model = "text-curie-001" TextBabbage001 Model = "text-babbage-001" TextAda001 Model = "text-ada-001" Davinci Model = "davinci" Curie Model = "curie" Babbage Model = "babbage" Ada Model = "ada" TextSimilarityDavinci001 Model = "text-similarity-davinci-001" TextSimilarityCurie001 Model = "text-similarity-curie-001" TextSimilarityBabbage001 Model = "text-similarity-babbage-001" TextSimilarityAda001 Model = "text-similarity-ada-001" TextSearchDavinciDoc001 Model = "text-search-davinci-doc-001" TextSearchCurieDoc001 Model = "text-search-curie-doc-001" TextSearchAdaDoc001 Model = "text-search-ada-doc-001" TextSearchBabbageDoc001 Model = "text-search-babbage-doc-001" CodeSearchBabbageCode001 Model = "code-search-babbage-code-001" CodeSearchAdaCode001 Model = "code-search-ada-code-001" TextDavinciEdit001 Model = "text-davinci-edit-001" CodeDavinciEdit001 Model = "code-davinci-edit-001" GPT2 Model = "gpt2" )
Click to show internal directories.
Click to hide internal directories.