Documentation
¶
Index ¶
- func ParseScanSizeLimit(sizeStr string) (uint64, error)
- type Agent
- func (a *Agent) Configure(ctx context.Context) error
- func (a *Agent) Flags() []cli.Flag
- func (a *Agent) Helper() *cli.Command
- func (a *Agent) ID() string
- func (a *Agent) Init(ctx context.Context, llmClient gollem.LLMClient, memoryService *memory.Service) (bool, error)
- func (a *Agent) IsEnabled() bool
- func (a *Agent) LogValue() slog.Value
- func (a *Agent) Name() string
- func (a *Agent) Prompt(ctx context.Context) (string, error)
- func (a *Agent) Run(ctx context.Context, name string, args map[string]any) (map[string]any, error)
- func (a *Agent) Specs(ctx context.Context) ([]gollem.ToolSpec, error)
- type Config
- type DatasetConfig
- type ProjectConfig
- type TableConfig
- type TableDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseScanSizeLimit ¶
ParseScanSizeLimit parses human-readable size string (e.g., "10GB") into bytes
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent represents a BigQuery Sub-Agent
func NewAgent ¶
NewAgent creates a new BigQuery Agent instance with config (for testing and direct use)
func (*Agent) Init ¶
func (a *Agent) Init(ctx context.Context, llmClient gollem.LLMClient, memoryService *memory.Service) (bool, error)
Init initializes the agent with LLM client and memory service. Returns (true, nil) if initialized successfully, (false, nil) if not configured, or (false, error) on error.
func (*Agent) Prompt ¶
Prompt implements interfaces.Tool Returns table descriptions for system prompt
type Config ¶
type Config struct {
Tables []TableConfig `yaml:"-"` // Internal use only (expanded from Projects)
Projects []ProjectConfig `yaml:"projects"` // Hierarchical configuration
ScanSizeLimit uint64 `yaml:"-"` // Parsed from ScanSizeLimitStr
ScanSizeLimitStr string `yaml:"scan_size_limit"`
QueryTimeout time.Duration `yaml:"query_timeout"` // Timeout for waiting for BigQuery job completion (default: 5 minutes)
}
Config represents BigQuery Agent configuration
func LoadConfig ¶
LoadConfig loads BigQuery Agent configuration from a YAML file
func (*Config) GetQueryTimeout ¶
GetQueryTimeout returns the query timeout with fallback to default
type DatasetConfig ¶
type DatasetConfig struct {
ID string `yaml:"id"`
Description string `yaml:"description,omitempty"`
Tables []TableDetail `yaml:"tables"`
}
DatasetConfig represents a BigQuery dataset with tables
type ProjectConfig ¶
type ProjectConfig struct {
ID string `yaml:"id"`
Description string `yaml:"description,omitempty"`
Datasets []DatasetConfig `yaml:"datasets"`
}
ProjectConfig represents a GCP project with datasets
type TableConfig ¶
type TableConfig struct {
ProjectID string `yaml:"project_id"`
DatasetID string `yaml:"dataset_id"`
TableID string `yaml:"table_id"`
Description string `yaml:"description"`
}
TableConfig represents a BigQuery table configuration (flat structure for backward compatibility)
type TableDetail ¶
TableDetail represents a table within a dataset