googleai

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefineEmbedder

func DefineEmbedder(name string) *ai.Embedder

DefineEmbedder defines an embedder with a given name.

func DefineModel

func DefineModel(name string, caps *ai.ModelCapabilities) (*ai.Model, error)

DefineModel defines an unknown model with the given name. The second argument describes the capability of the model. Use IsKnownModel to determine if a model is known.

func Embedder

func Embedder(name string) *ai.Embedder

Embedder returns the ai.Embedder with the given name. It returns nil if the embedder was not configured.

func Init

func Init(ctx context.Context, apiKey string) (err error)

Init initializes the plugin and all known models and embedders. After calling Init, you may call DefineModel and DefineEmbedder to create and register any additional generative models and embedders

func IsKnownModel

func IsKnownModel(name string) bool

IsKnownModel reports whether a model is known to this plugin.

func KnownModels

func KnownModels() []string

KnownModels returns a slice of all known model names.

func Model

func Model(name string) *ai.Model

Model returns the ai.ModelAction with the given name. It returns nil if the model was not configured.

Types

This section is empty.

Jump to

Keyboard shortcuts

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