commands

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgCmdShortDesc = &i18n.Message{
		ID:    "commands.CmdShortDesc",
		Other: "Financial Trading LLM AI Agent. **This is Not Financial Advice.**",
	}

	MsgGlobalOptsVerbosityDesc = &i18n.Message{
		ID:    "commands.GlobalOptsVerbosityDesc",
		Other: "Number for the log level verbosity (0, 1, or 2)",
	}
	MsgGlobalOptsDataRootDesc = &i18n.Message{
		ID:    "commands.GlobalOptsDataRootDesc",
		Other: "Path of data root directory",
	}
	MsgGlobalOptsLangDesc = &i18n.Message{
		ID:    "commands.GlobalOptsLangDesc",
		Other: "The language used in UI (en or zh)",
	}

	MsgRootOptsModelDesc = &i18n.Message{
		ID:    "commands.RootOptsModelDesc",
		Other: "Default primary model for the current session",
	}
	MsgRootOptsLightModelDesc = &i18n.Message{
		ID:    "commands.RootOptsLightModelDesc",
		Other: "Default light model for the current session",
	}
	MsgRootOptsPrintAndExitDesc = &i18n.Message{
		ID:    "commands.RootOptsPrintAndExitDesc",
		Other: "Print answer and exit after responding",
	}
	MsgRootOptsResumeDesc = &i18n.Message{
		ID:    "commands.RootOptsResumeDesc",
		Other: "Resume a previous session by session ID",
	}

	MsgCmdShortDescModels     = &i18n.Message{ID: "commands.CmdShortDescModels", Other: "Manage LLMs used by the agent"}
	MsgCmdShortDescModelsList = &i18n.Message{ID: "commands.CmdShortDescModelsList", Other: "List available models"}

	MsgReasoningTag = &i18n.Message{ID: "commands.ReasoningTag", Other: "Reasoning"}
	MsgVisionTag    = &i18n.Message{ID: "commands.VisionTag", Other: "Vision"}

	MsgCmdShortDescOtter = &i18n.Message{ID: "commands.CmdShortDescOtter", Other: "Print Otter image"}

	MsgOtterOptsColorDesc      = &i18n.Message{ID: "commands.OtterOptsColorDesc", Other: "Print with color"}
	MsgOtterOptsBackgroundDesc = &i18n.Message{ID: "commands.OtterOptsBackgroundDesc", Other: "Print with background"}
	MsgOtterOptsScaleDesc      = &i18n.Message{ID: "commands.OtterOptsScaleDesc", Other: "Scaling factor"}

	MsgCmdShortDescVersion         = &i18n.Message{ID: "commands.CmdShortDescVersion", Other: "Print the version information"}
	MsgVersionOptsOutputFormatDesc = &i18n.Message{ID: "commands.VersionOptsOutputFormatDesc", Other: "Output format. One of (json)"}
)

Functions

func NewCommand

func NewCommand(name string) *cobra.Command

NewCommand 创建根命令

Types

type APOOptions

type APOOptions struct {
	// 优化选项文件
	OptionsFile string
	// 最大迭代轮次
	MaxTurns int
	// 预期准确率
	ExpectedAccuracy float64
}

APOOptions internal-tools apo 子命令选项

func NewAPOOptions

func NewAPOOptions() APOOptions

NewAPOOptions 创建 internal-tools apo 子命令选项

func (*APOOptions) AddPFlags

func (o *APOOptions) AddPFlags(fs *pflag.FlagSet)

AddPFlags 将选项绑定到命令行参数

type GlobalOptions

type GlobalOptions struct {
	// 日志数量级别( 0 / 1 / 2 )
	Verbosity uint32
	// 数据存储根目录
	DataRoot string
	// 语言
	Language string
}

GlobalOptions 全局选项

func NewGlobalOptions

func NewGlobalOptions() GlobalOptions

NewGlobalOptions 创建默认 GlobalOptions

func (*GlobalOptions) AddPFlags

func (o *GlobalOptions) AddPFlags(fs *pflag.FlagSet)

AddPFlags 将选项绑定到命令行参数

func (*GlobalOptions) Validate

func (o *GlobalOptions) Validate() error

Validate 校验选项是否合法

type Options

type Options struct {
	Model        string
	LightModel   string
	PrintAndExit bool
	Resume       string
}

Options 运行选项

func NewOptions

func NewOptions() Options

NewOptions 创建默认 Options

func (*Options) AddPFlags

func (o *Options) AddPFlags(fs *pflag.FlagSet)

AddPFlags 将选项绑定到命令行参数

type OtterOptions

type OtterOptions struct {
	// 是否打印彩色图片
	Color bool
	// 是否打印背景
	Background bool
	// 缩放比例
	Scale int
}

OtterOptions otter 子命令选项

func NewOtterOptions

func NewOtterOptions() OtterOptions

NewOtterOptions 创建默认 OtterOptions

func (*OtterOptions) AddPFlags

func (opts *OtterOptions) AddPFlags(fs *pflag.FlagSet)

AddPFlags 将选项绑定到命令行参数

type VersionOptions added in v0.1.1

type VersionOptions struct {
	// 输出格式
	// yaml 或 json
	OutputFormat string `json:"outputFormat,omitempty" yaml:"outputFormat,omitempty"`
}

VersionOptions version 子命令选项

func NewVersionOptions added in v0.1.1

func NewVersionOptions() VersionOptions

NewVersionOptions 创建默认的 version 子命令选项

func (*VersionOptions) AddPFlags added in v0.1.1

func (opts *VersionOptions) AddPFlags(fs *pflag.FlagSet)

AddPFlags 将选项绑定到命令行

func (*VersionOptions) Validate added in v0.1.1

func (opts *VersionOptions) Validate() error

Validate 校验选项

Jump to

Keyboard shortcuts

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