llm

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 50 Imported by: 0

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, mode AgentMode) 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 ProjectInstructions

func ProjectInstructions(workingDir 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"
)

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