Versions in this module Expand all Collapse all v0 v0.7.0 Aug 8, 2025 Changes in this version type Model + const GPT41 + const GPT5 + const GPT5Mini + const GPT5Nano + const O1 + const O3 + const O4Mini v0.6.2 May 9, 2025 v0.6.1 Mar 27, 2025 v0.6.0 Mar 7, 2025 Changes in this version type Model + const O3Mini v0.5.1 Feb 25, 2025 v0.5.0 Feb 17, 2025 Changes in this version type Codec + Count func(string) (int, error) v0.4.0 Feb 12, 2025 v0.3.0 Jan 28, 2025 v0.2.1 Nov 22, 2024 Changes in this version type Model + const O1Mini + const O1Preview v0.2.0 Sep 13, 2024 Changes in this version type Encoding + const O200kBase type Model + const GPT35 + const GPT4o v0.1.1 May 10, 2024 v0.1.0 Apr 11, 2023 v0.0.9 Apr 11, 2023 v0.0.8 Apr 9, 2023 Changes in this version + var ErrEncodingNotSupported = errors.New("encoding not supported") + var ErrModelNotSupported = errors.New("model not supported") + type Codec interface + Decode func([]uint) (string, error) + Encode func(string) ([]uint, []string, error) + GetName func() string + func ForModel(model Model) (Codec, error) + func Get(encoding Encoding) (Codec, error) + type Encoding string + const Cl100kBase + const GPT2Enc + const P50kBase + const P50kEdit + const R50kBase + type Model string + const Ada + const Babbage + const CodeCushman001 + const CodeCushman002 + const CodeDavinci001 + const CodeDavinci002 + const CodeDavinciEdit001 + const CodeSearchAdaCode001 + const CodeSearchBabbageCode001 + const Curie + const CushmanCodex + const Davinci + const DavinciCodex + const GPT2 + const GPT35Turbo + const GPT4 + const TextAda001 + const TextBabbage001 + const TextCurie001 + const TextDavinci001 + const TextDavinci002 + const TextDavinci003 + const TextDavinciEdit001 + const TextEmbeddingAda002 + const TextSearchAdaDoc001 + const TextSearchBabbageDoc001 + const TextSearchCurieDoc001 + const TextSearchDavinciDoc001 + const TextSimilarityAda001 + const TextSimilarityBabbage001 + const TextSimilarityCurie001 + const TextSimilarityDavinci001