aicmd

package
v0.0.0-...-f626111 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AICommand = &gcli.Command{
	Name: "ai",
	Desc: "AI tool command",
	Subs: []*gcli.Command{
		NewAIChatCmd(),
		NewQuestionCmd(),
		NewTranslateCmd(),
		NewAIToolCmd(),
	},
}

Functions

func NewAIChatCmd

func NewAIChatCmd() *gcli.Command

NewAIChatCmd create 实现一个AI终端

  • 可以跟AI大模型交互
  • 支持多轮对话
  • 支持子命令调整设置
  • 支持上下文存储
  • 支持历史记录存储

func NewAIToolCmd

func NewAIToolCmd() *gcli.Command

NewAIToolCmd AI工具命令,通过内置的提示词将ai当做工具使用

func NewQuestionCmd

func NewQuestionCmd() *gcli.Command

NewQuestionCmd create.

func NewTranslateCmd

func NewTranslateCmd() *gcli.Command

NewTranslateCmd instance

Types

type AICommonOptions

type AICommonOptions struct {
	// custom set llm model name
	Model string
	// custom set llm provider name. eg: openai, deepseek, aliyun/bailian, siliconflow
	Provider  string
	SystemMsg string
}

func (*AICommonOptions) BindFlags

func (o *AICommonOptions) BindFlags(c *gcli.Command)

BindFlags for common options

type AITerminal

type AITerminal struct {
	AICommonOptions
	SystemPrompt string
	// contains filtered or unexported fields
}

func (*AITerminal) Create

func (at *AITerminal) Create()

Create terminal

func (*AITerminal) Run

func (at *AITerminal) Run()

Jump to

Keyboard shortcuts

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