Help us shape the future of Go! Take the 2026 Go Developer Survey

v0

package
v1.113.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0"

Variables

This section is empty.

Functions

func Register

func Register(parsers map[string]func([]byte) (any, error), upgraders *[]func(any, []byte) (any, error))

Types

type AgentConfig

type AgentConfig struct {
	Name            string         `json:"name,omitempty" yaml:"name,omitempty"`
	Model           string         `json:"model,omitempty" yaml:"model,omitempty"`
	Description     string         `json:"description,omitempty" yaml:"description,omitempty"`
	Toolsets        []Toolset      `json:"toolsets,omitempty" yaml:"toolsets,omitempty"`
	Instruction     string         `json:"instruction,omitempty" yaml:"instruction,omitempty"`
	SubAgents       []string       `json:"sub_agents,omitempty" yaml:"sub_agents,omitempty"`
	AddDate         bool           `json:"add_date,omitempty" yaml:"add_date,omitempty"`
	Think           bool           `json:"think,omitempty" yaml:"think,omitempty"`
	Todo            TodoConfig     `json:"todo" yaml:"todo,omitempty"`
	MemoryConfig    MemoryConfig   `json:"memory" yaml:"memory,omitempty"`
	NumHistoryItems int            `json:"num_history_items,omitempty" yaml:"num_history_items,omitempty"`
	Commands        types.Commands `json:"commands,omitempty" yaml:"commands,omitempty"`
}

AgentConfig represents a single agent configuration

type Config

type Config struct {
	Version string                 `json:"version,omitempty"`
	Agents  map[string]AgentConfig `json:"agents,omitempty" yaml:"agents,omitempty"`
	Models  map[string]ModelConfig `json:"models,omitempty" yaml:"models,omitempty"`
	Env     map[string]string      `json:"env,omitempty" yaml:"env,omitempty"`
}

Config represents the entire configuration file

type MemoryConfig

type MemoryConfig struct {
	Path string `json:"path,omitempty" yaml:"path,omitempty"`
}

type ModelConfig

type ModelConfig struct {
	Type              string            `json:"type,omitempty" yaml:"type,omitempty"`
	Model             string            `json:"model,omitempty" yaml:"model,omitempty"`
	Temperature       float64           `json:"temperature,omitempty" yaml:"temperature,omitempty"`
	MaxTokens         int               `json:"max_tokens,omitempty" yaml:"max_tokens,omitempty"`
	TopP              float64           `json:"top_p,omitempty" yaml:"top_p,omitempty"`
	FrequencyPenalty  float64           `json:"frequency_penalty,omitempty" yaml:"frequency_penalty,omitempty"`
	PresencePenalty   float64           `json:"presence_penalty,omitempty" yaml:"presence_penalty,omitempty"`
	BaseURL           string            `json:"base_url,omitempty" yaml:"base_url,omitempty"`
	ParallelToolCalls *bool             `json:"parallel_tool_calls,omitempty" yaml:"parallel_tool_calls,omitempty"`
	Env               map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
}

ModelConfig represents the configuration for a model

type Remote

type Remote struct {
	URL           string            `json:"url" yaml:"url"`
	TransportType string            `json:"transport_type,omitempty" yaml:"transport_type,omitempty"`
	Headers       map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
}

type TodoConfig

type TodoConfig struct {
	Enabled bool `json:"-" yaml:"-"`
	Shared  bool `json:"shared,omitempty" yaml:"shared,omitempty"`
}

TodoConfig represents todo configuration that can be either a boolean or an object

func (*TodoConfig) UnmarshalYAML

func (t *TodoConfig) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements custom unmarshaling for TodoConfig to support both boolean and object formats

type Toolset

type Toolset struct {
	Type     string             `json:"type,omitempty" yaml:"type,omitempty"`
	Command  string             `json:"command,omitempty" yaml:"command,omitempty"`
	Remote   Remote             `json:"remote" yaml:"remote,omitempty"`
	Args     []string           `json:"args,omitempty" yaml:"args,omitempty"`
	Env      map[string]string  `json:"env,omitempty" yaml:"env,omitempty"`
	Envfiles types.StringOrList `json:"env_file,omitempty" yaml:"env_file,omitempty"`
	Tools    []string           `json:"tools,omitempty" yaml:"tools,omitempty"`
}

Toolset represents a tool configuration.

func (*Toolset) UnmarshalYAML

func (t *Toolset) UnmarshalYAML(unmarshal func(any) error) error

Jump to

Keyboard shortcuts

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