Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AITerminal ¶
type AITerminal struct {
Config *ChatConfig
Completer *readline.PrefixCompleter
CurrentTopic string
}
func (*AITerminal) Run ¶
func (at *AITerminal) Run()
type ChatConfig ¶
type ChatConfig struct {
Temperature float32
MaxTokens int
APITimeout time.Duration
Model string
Provider string
}
ChatConfig 基础设置
type ChatSession ¶
type ChatSession struct {
Context []string
History []string
// ContextLimit value
ContextLimit int
CurrentTopic string
// contains filtered or unexported fields
}
func (*ChatSession) CreateTopic ¶
func (s *ChatSession) CreateTopic(name string)
func (*ChatSession) SwitchTopic ¶
func (s *ChatSession) SwitchTopic(name string)
type DefaultValidator ¶
type DefaultValidator struct {
// contains filtered or unexported fields
}
func (*DefaultValidator) Validate ¶
func (v *DefaultValidator) Validate(call FunctionCall) error
type FunctionHandler ¶
type SessionManager ¶
type SessionManager struct {
}
type ToolCallValidator ¶
type ToolCallValidator interface {
Validate(call FunctionCall) error
}
type ToolRegistry ¶
type ToolRegistry struct {
// contains filtered or unexported fields
}
ToolRegistry 工具函数注册表
func (*ToolRegistry) CallHandler ¶
func (tr *ToolRegistry) CallHandler(ctx context.Context, call FunctionCall) (any, error)
CallHandler 处理函数调用
func (*ToolRegistry) Handler ¶
func (tr *ToolRegistry) Handler(name string) (FunctionHandler, bool)
Handler get by name
func (*ToolRegistry) Register ¶
func (tr *ToolRegistry) Register(spec FunctionSpec, handler FunctionHandler) error
Register 注册函数
func (*ToolRegistry) Specs ¶
func (tr *ToolRegistry) Specs() []FunctionSpec
type TopicManager ¶
type TopicManager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.