Documentation ¶
Index ¶
- Variables
- func DefineEmbedder(name string) ai.Embedder
- func DefineModel(name string, caps *ai.ModelCapabilities) (ai.Model, error)
- func Embedder(name string) ai.Embedder
- func Init(ctx context.Context, cfg *Config) (err error)
- func IsDefinedEmbedder(name string) bool
- func IsDefinedModel(name string) bool
- func Model(name string) ai.Model
- type Config
Constants ¶
This section is empty.
Variables ¶
var ( // BasicText describes model capabilities for text-only GPT models. BasicText = ai.ModelCapabilities{ Multiturn: true, Tools: true, SystemRole: true, Media: false, } // Multimodal describes model capabilities for multimodal GPT models. Multimodal = ai.ModelCapabilities{ Multiturn: true, Tools: true, SystemRole: true, Media: true, } )
Functions ¶
func DefineEmbedder ¶
DefineEmbedder defines an embedder with a given name.
func DefineModel ¶
DefineModel defines an unknown model with the given name. The second argument describes the capability of the model. Use IsDefinedModel to determine if a model is already defined. After Init is called, only the known models are defined.
func Embedder ¶
Embedder returns the ai.Embedder with the given name. It returns nil if the embedder was not defined.
func Init ¶
Init initializes the plugin and all known models. After calling Init, you may call DefineModel to create and register any additional generative models.
func IsDefinedEmbedder ¶
IsDefinedEmbedder reports whether the named Embedder is defined by this plugin.
func IsDefinedModel ¶
IsDefinedModel reports whether the named Model is defined by this plugin.