Documentation
¶
Index ¶
Constants ¶
View Source
const ( PluginTypeTool = "tool" PluginTypeModelProvider = "model_provider" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelEntry ¶
type ModelEntry struct {
ApiKey string `json:"apiKey"`
BaseUrl string `json:"baseUrl"`
ModelId string `json:"modelId"`
Label string `json:"label"`
}
ModelEntry represents a model resource provided by a model_provider plugin.
type ModelProviderPlugin ¶
type ModelProviderPlugin interface {
Plugin
Models(ctx context.Context) ([]ModelEntry, error)
}
ModelProviderPlugin is the interface for model_provider-type plugins.
type Plugin ¶
type Plugin interface {
Meta() PluginMeta
}
Plugin is the base interface that every .so plugin must implement.
type PluginMeta ¶
type PluginMeta struct {
Type string `json:"type"`
Name string `json:"name"`
Description string `json:"description"`
Parameters json.RawMessage `json:"parameters,omitempty"`
}
PluginMeta describes a plugin.
type ToolPlugin ¶
type ToolPlugin interface {
Plugin
Execute(ctx context.Context, args json.RawMessage) (string, error)
}
ToolPlugin is the interface for tool-type plugins.
Click to show internal directories.
Click to hide internal directories.