Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchBuilder ¶
type BatchBuilder interface {
Parameters() parameters.Parameters
BuildBatch(parameters.ParamValues) (*dataprocpb.Batch, error)
}
type Config ¶
type Config struct {
tools.ConfigBase `yaml:",inline"`
Type string `yaml:"type" validate:"required"`
Source string `yaml:"source" validate:"required"`
RuntimeConfig *dataprocpb.RuntimeConfig `yaml:"runtimeConfig"`
EnvironmentConfig *dataprocpb.EnvironmentConfig `yaml:"environmentConfig"`
}
Config is a common config that can be used with any type of create batch tool. However, each tool will still need its own config type, embedding this Config, so it can provide a type-specific Initialize implementation.
type Tool ¶
type Tool struct {
tools.BaseTool[Config]
Builder BatchBuilder
// contains filtered or unexported fields
}
func NewTool ¶
func NewTool(cfg Config, originalCfg tools.ToolConfig, srcs map[string]sources.Source, builder BatchBuilder) (*Tool, error)
func (Tool) EmbedParams ¶
func (t Tool) EmbedParams(ctx context.Context, paramValues parameters.ParamValues, embeddingModelsMap map[string]embeddingmodels.EmbeddingModel) (parameters.ParamValues, error)
func (*Tool) Invoke ¶
func (t *Tool) Invoke(ctx context.Context, resourceMgr tools.SourceProvider, params parameters.ParamValues, accessToken tools.AccessToken) (any, util.ToolboxError)
func (*Tool) ToConfig ¶
func (t *Tool) ToConfig() tools.ToolConfig
Click to show internal directories.
Click to hide internal directories.