llm

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderClaude = "claude"
View Source
const ProviderCodex = "codex"
View Source
const ProviderKimi = "kimi"

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Run(ctx context.Context, req RunRequest) (RunResult, error)
}

func NewBackend

func NewBackend(cfg FactoryConfig) (Backend, error)

type ClaudeConfig

type ClaudeConfig struct {
	Command      string
	Timeout      time.Duration
	Env          map[string]string
	PromptPrefix string
	WorkspaceDir string
}

type CodexConfig

type CodexConfig struct {
	Command         string
	Timeout         time.Duration
	Model           string
	ReasoningEffort string
	Env             map[string]string
	PromptPrefix    string
	WorkspaceDir    string
	ChatExecPolicy  ExecPolicyConfig
	WorkExecPolicy  ExecPolicyConfig
}

type ExecPolicyConfig added in v0.4.0

type ExecPolicyConfig struct {
	Sandbox        string
	AskForApproval string
	AddDirs        []string
}

type FactoryConfig

type FactoryConfig struct {
	Provider string
	Prompts  *prompting.Loader
	Codex    CodexConfig
	Claude   ClaudeConfig
	Kimi     KimiConfig
}

type KimiConfig

type KimiConfig struct {
	Command      string
	Timeout      time.Duration
	Env          map[string]string
	PromptPrefix string
	WorkspaceDir string
}

type ProgressFunc

type ProgressFunc func(step string)

type Provider

type Provider interface {
	Backend() Backend
}

func NewProvider

func NewProvider(cfg FactoryConfig) (Provider, error)

type RunRequest

type RunRequest struct {
	ThreadID        string
	AgentName       string
	UserText        string
	Scene           string
	Model           string
	Profile         string
	ReasoningEffort string
	Personality     string
	NoReplyToken    string
	Env             map[string]string
	OnProgress      ProgressFunc
}

type RunResult

type RunResult struct {
	Reply        string
	NextThreadID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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