Documentation
¶
Index ¶
- Constants
- func CloseAgents(agents []*agent.Agent)
- func DefaultConfigPath() string
- func FindRepoRoot(from string) (string, error)
- func RandomUserPrompt(rng *rand.Rand) string
- func RegisterBenchmarkTools(count int, cfg ToolConfig, rng *rand.Rand) *tools.Registry
- func RootOptions(cfg *Config, llm interfaces.LLMClient, lgr logger.Logger, ...) []agent.Option
- func RootSystemPrompt(treeRng *rand.Rand) string
- func RunRNG() *rand.Rand
- func SetupAgentLogger(cfg *Config, repoRoot string) (logger.Logger, func(), error)
- func SetupWorkerLogger(cfg *Config, repoRoot string, workerID int) (logger.Logger, func(), error)
- func TaskQueueFor(cfg *Config, suffix string) string
- func TreeRNG() *rand.Rand
- type AgentConfig
- type AgentToolsConfig
- type AgentTree
- type Config
- type LLMConfig
- type LLMStats
- type LoggerConfig
- type MockBenchmarkTool
- type MockLLMClient
- func (m *MockLLMClient) Generate(ctx context.Context, request *interfaces.LLMRequest) (*interfaces.LLMResponse, error)
- func (m *MockLLMClient) GenerateStream(ctx context.Context, request *interfaces.LLMRequest) (interfaces.LLMStream, error)
- func (m *MockLLMClient) GetModel() string
- func (m *MockLLMClient) GetProvider() interfaces.LLMProvider
- func (m *MockLLMClient) IsStreamSupported() bool
- func (m *MockLLMClient) Stats() *LLMStats
- type OutputConfig
- type SubagentsConfig
- type TemporalConfig
- type ToolConfig
Constants ¶
View Source
const BenchmarkToolPrefix = "benchmark_tool_"
View Source
const BenchmarkTreeSeed int64 = 42
View Source
const MockLLMModel = "benchmark-mock"
View Source
const RootAgentName = "benchmark-agent"
Variables ¶
This section is empty.
Functions ¶
func CloseAgents ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns the default benchmark config file path.
func FindRepoRoot ¶
func RandomUserPrompt ¶
func RegisterBenchmarkTools ¶
func RootOptions ¶
func RootOptions( cfg *Config, llm interfaces.LLMClient, lgr logger.Logger, name, systemPrompt string, subAgents []*agent.Agent, taskQueue string, enableRemoteWorkers bool, ) []agent.Option
RootOptions returns agent options shared by the benchmark root agent and root worker. enableRemoteWorkers is agent-only (EnableRemoteWorkers).
func RootSystemPrompt ¶
func SetupAgentLogger ¶
func SetupWorkerLogger ¶
func TaskQueueFor ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Runs int `mapstructure:"runs"`
Concurrent bool `mapstructure:"concurrent"`
ConcurrentCount int `mapstructure:"concurrent_count"`
Tools AgentToolsConfig `mapstructure:"tools"`
Subagents SubagentsConfig `mapstructure:"subagents"`
}
type AgentToolsConfig ¶
type AgentTree ¶
func BuildAgentTree ¶
type Config ¶
type Config struct {
Runtime string `mapstructure:"runtime"`
Temporal TemporalConfig `mapstructure:"temporal"`
LLM LLMConfig `mapstructure:"llm"`
Tool ToolConfig `mapstructure:"tool"`
Agent AgentConfig `mapstructure:"agent"`
Logger LoggerConfig `mapstructure:"logger"`
Output OutputConfig `mapstructure:"output"`
}
func LoadConfig ¶
func (*Config) ExternalWorkersEnabled ¶
func (*Config) UseTemporal ¶
type LLMStats ¶
type LLMStats struct {
TotalInputTokens int
TotalOutputTokens int
// contains filtered or unexported fields
}
func NewLLMStats ¶
func NewLLMStats() *LLMStats
type LoggerConfig ¶
type MockBenchmarkTool ¶
type MockBenchmarkTool struct {
// contains filtered or unexported fields
}
func NewMockBenchmarkTool ¶
func NewMockBenchmarkTool(index int, cfg ToolConfig, rng *rand.Rand) *MockBenchmarkTool
func (*MockBenchmarkTool) Description ¶
func (t *MockBenchmarkTool) Description() string
func (*MockBenchmarkTool) DisplayName ¶
func (t *MockBenchmarkTool) DisplayName() string
func (*MockBenchmarkTool) Name ¶
func (t *MockBenchmarkTool) Name() string
func (*MockBenchmarkTool) Parameters ¶
func (t *MockBenchmarkTool) Parameters() interfaces.JSONSchema
type MockLLMClient ¶
type MockLLMClient struct {
// contains filtered or unexported fields
}
func NewMockLLMClient ¶
func NewMockLLMClient(cfg LLMConfig, stats *LLMStats, rng *rand.Rand) *MockLLMClient
func (*MockLLMClient) Generate ¶
func (m *MockLLMClient) Generate(ctx context.Context, request *interfaces.LLMRequest) (*interfaces.LLMResponse, error)
func (*MockLLMClient) GenerateStream ¶
func (m *MockLLMClient) GenerateStream(ctx context.Context, request *interfaces.LLMRequest) (interfaces.LLMStream, error)
func (*MockLLMClient) GetModel ¶
func (m *MockLLMClient) GetModel() string
func (*MockLLMClient) GetProvider ¶
func (m *MockLLMClient) GetProvider() interfaces.LLMProvider
func (*MockLLMClient) IsStreamSupported ¶
func (m *MockLLMClient) IsStreamSupported() bool
func (*MockLLMClient) Stats ¶
func (m *MockLLMClient) Stats() *LLMStats
type OutputConfig ¶
type SubagentsConfig ¶
type TemporalConfig ¶
type ToolConfig ¶
Click to show internal directories.
Click to hide internal directories.