llm

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 50 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoCompact

func AutoCompact(ctx context.Context, client LLMClient, history []core.Message, toolRegistry *tools.Registry, sessionID string) ([]core.Message, *core.TokenUsage, error)

func Build

func Build(workingDir, skillsCatalog, subagentsCatalog string) string

func BuildAdversaryPrompt

func BuildAdversaryPrompt(workingDir string) string

func BuildAutoCompactionPrompt

func BuildAutoCompactionPrompt() string

func BuildBtwPrompt

func BuildBtwPrompt(workingDir string) string

func BuildCompactionPrompt

func BuildCompactionPrompt(extraPrompt string) string

BuildCompactionPrompt builds the manual compaction instruction sent as the final user message.

func ModeUserSuffix added in v0.56.2

func ModeUserSuffix(mode AgentMode) string

func ProjectInstructions

func ProjectInstructions(workingDir string) string

func StripModeSuffix added in v0.56.2

func StripModeSuffix(content string) string

func ToGenkitTool

func ToGenkitTool(t tools.Tool) *ai.ToolDef[any, any]

func ToGenkitTools

func ToGenkitTools(registry *tools.Registry) []ai.ToolRef

Types

type AgentMode

type AgentMode string
const (
	ModeBuild AgentMode = "build"
	ModePlan  AgentMode = "plan"
	ModeYolo  AgentMode = "yolo"
)

type AnthropicClient

type AnthropicClient struct {
	// contains filtered or unexported fields
}

func NewAnthropicClient

func NewAnthropicClient(cfg *providerconfig.ClientConfig) (*AnthropicClient, error)

func (*AnthropicClient) Reset

func (c *AnthropicClient) Reset()

func (*AnthropicClient) StreamChat

func (c *AnthropicClient) StreamChat(
	ctx context.Context,
	messages []core.Message,
	toolRegistry *tools.Registry,
	opts ...core.StreamOptions,
) (<-chan core.StreamEvent, error)

type BedrockClient

type BedrockClient struct {
	// contains filtered or unexported fields
}

func NewBedrockClient

func NewBedrockClient(cfg *providerconfig.ClientConfig) (*BedrockClient, error)

func (*BedrockClient) Reset

func (c *BedrockClient) Reset()

func (*BedrockClient) StreamChat

func (c *BedrockClient) StreamChat(
	ctx context.Context,
	messages []core.Message,
	toolRegistry *tools.Registry,
	opts ...core.StreamOptions,
) (<-chan core.StreamEvent, error)

type GenkitClient

type GenkitClient struct {
	// contains filtered or unexported fields
}

func NewGenkitClient

func NewGenkitClient(cfg *providerconfig.ClientConfig) (*GenkitClient, error)

func (*GenkitClient) Reset

func (c *GenkitClient) Reset()

func (*GenkitClient) StreamChat

func (c *GenkitClient) StreamChat(
	ctx context.Context,
	messages []core.Message,
	toolRegistry *tools.Registry,
	opts ...core.StreamOptions,
) (<-chan core.StreamEvent, error)

type LLMClient

type LLMClient interface {
	StreamChat(ctx context.Context, messages []core.Message, toolRegistry *tools.Registry, opts ...core.StreamOptions) (<-chan core.StreamEvent, error)
	Reset()
}

func NewClient

func NewClient(cfg *config.ResolvedConfig) (LLMClient, error)

type OpenAICodexClient

type OpenAICodexClient struct {
	// contains filtered or unexported fields
}

func NewOpenAICodexClient

func NewOpenAICodexClient(cfg *providerconfig.ClientConfig) (*OpenAICodexClient, error)

func (*OpenAICodexClient) Reset

func (c *OpenAICodexClient) Reset()

func (*OpenAICodexClient) StreamChat

func (c *OpenAICodexClient) StreamChat(ctx context.Context, messages []core.Message, toolRegistry *tools.Registry, opts ...core.StreamOptions) (<-chan core.StreamEvent, error)

type OpenAICompatibleClient

type OpenAICompatibleClient struct {
	// contains filtered or unexported fields
}

func (*OpenAICompatibleClient) Reset

func (c *OpenAICompatibleClient) Reset()

func (*OpenAICompatibleClient) StreamChat

func (c *OpenAICompatibleClient) StreamChat(
	ctx context.Context,
	messages []core.Message,
	toolRegistry *tools.Registry,
	opts ...core.StreamOptions,
) (<-chan core.StreamEvent, error)

type OpenAIResponsesClient

type OpenAIResponsesClient struct {
	// contains filtered or unexported fields
}

func NewOpenAIResponsesClient

func NewOpenAIResponsesClient(cfg *providerconfig.ClientConfig) (*OpenAIResponsesClient, error)

func (*OpenAIResponsesClient) Reset

func (c *OpenAIResponsesClient) Reset()

func (*OpenAIResponsesClient) StreamChat

func (c *OpenAIResponsesClient) StreamChat(
	ctx context.Context,
	messages []core.Message,
	toolRegistry *tools.Registry,
	opts ...core.StreamOptions,
) (<-chan core.StreamEvent, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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