llm

package
v0.0.0-...-dd4b9f5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripYAMLMarkers

func StripYAMLMarkers(input []byte) ([]byte, error)

StripYAMLMarkers looks for ```yaml and ``` markers in the input byte slice. If found, it strips these markers and returns the content between them. If markers are not found, the original byte slice is returned.

Types

type Claude

type Claude struct {
	URL string
	// contains filtered or unexported fields
}

func (*Claude) AddPostProcessor

func (c *Claude) AddPostProcessor(p PostProcessor)

func (*Claude) Run

func (c *Claude) Run(prompt string) ([]byte, error)

func (*Claude) Setup

func (c *Claude) Setup(_, _ string) error

type CommandExecutor

type CommandExecutor interface {
	Run(command string, args ...string) ([]byte, error)
}

type Gemini

type Gemini struct {
	Executor CommandExecutor
	// contains filtered or unexported fields
}

func (*Gemini) AddPostProcessor

func (g *Gemini) AddPostProcessor(p PostProcessor)

func (*Gemini) Run

func (g *Gemini) Run(agentPrompt string) ([]byte, error)

func (*Gemini) Setup

func (g *Gemini) Setup(workspacesDir, tokensDir string) error

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type PostProcessor

type PostProcessor func([]byte) ([]byte, error)

PostProcessor defines the signature for functions that can post-process the LLM's raw output.

type Provider

type Provider interface {
	Setup(workspacesDir, tokensDir string) error
	Run(prompt string) ([]byte, error)
	// AddPostProcessor adds a post-processing function to the provider.
	// These functions are applied sequentially to the LLM's raw output.
	AddPostProcessor(p PostProcessor)
}

Provider defines the interface for interacting with an LLM.

func NewLLMProvider

func NewLLMProvider(name string) (Provider, error)

type RealCommandExecutor

type RealCommandExecutor struct{}

func (*RealCommandExecutor) Run

func (e *RealCommandExecutor) Run(command string, args ...string) ([]byte, error)

Jump to

Keyboard shortcuts

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