llm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImagePayload

func BuildImagePayload(path string, required bool) (map[string]any, string, error)

func BuildReviewImages

func BuildReviewImages(evidence modes.CompareResult) ([]map[string]any, map[string]string, error)

func BuildReviewPromptText

func BuildReviewPromptText(opts ReviewOptions) string

func ExtractAssistantText

func ExtractAssistantText(turn *turns.Turn) string

func ReviewUsageConsoleText

func ReviewUsageConsoleText(result ReviewResult) string

func ReviewUsageMarkdownLines

func ReviewUsageMarkdownLines(result ReviewResult) []string

func SelectedAPIType

func SelectedAPIType(r *BootstrapResult) string

func SelectedModel

func SelectedModel(r *BootstrapResult) string

func SelectedProfile

func SelectedProfile(r *BootstrapResult) string

func SelectedRegistry

func SelectedRegistry(r *BootstrapResult) string

func WriteInferenceSettingsDebug

func WriteInferenceSettingsDebug(w io.Writer, r *BootstrapResult) error

func WriteReviewJSON

func WriteReviewJSON(path string, result ReviewResult) error

func WriteReviewMarkdown

func WriteReviewMarkdown(path string, result ReviewResult) error

Types

type BootstrapOptions

type BootstrapOptions struct {
	ConfigFile        string
	Profile           string
	ProfileRegistries []string
}

type BootstrapResult

type BootstrapResult struct {
	Parsed   *values.Values
	Resolved *profilebootstrap.ResolvedCLIEngineSettings
}

func ResolveEngineSettings

func ResolveEngineSettings(ctx context.Context, opts BootstrapOptions) (*BootstrapResult, error)

func (*BootstrapResult) BuildEngine

func (r *BootstrapResult) BuildEngine() (geppettoengine.Engine, error)

func (*BootstrapResult) Close

func (r *BootstrapResult) Close()

type ImageQuestionClient

type ImageQuestionClient struct {
	Bootstrap    *BootstrapResult
	SystemPrompt string
	Detail       string
}

func NewImageQuestionClient

func NewImageQuestionClient(bootstrap *BootstrapResult) *ImageQuestionClient

func (*ImageQuestionClient) AnswerQuestion

func (c *ImageQuestionClient) AnswerQuestion(ctx context.Context, imagePath string, question string) (ai.Answer, error)

type ReviewOptions

type ReviewOptions struct {
	Question       string
	Evidence       modes.CompareResult
	MaxProperties  int
	MaxWinnerDiffs int
	SystemPrompt   string
}

type ReviewResult

type ReviewResult struct {
	Question        string                          `json:"question"`
	Answer          string                          `json:"answer"`
	Model           string                          `json:"model,omitempty"`
	Provider        string                          `json:"provider,omitempty"`
	APIType         string                          `json:"apiType,omitempty"`
	Profile         string                          `json:"profile,omitempty"`
	Registry        string                          `json:"registry,omitempty"`
	PromptSummary   string                          `json:"promptSummary,omitempty"`
	Artifacts       map[string]string               `json:"artifacts,omitempty"`
	InferenceResult *geppettoengine.InferenceResult `json:"inferenceResult,omitempty"`
}

func ReviewCompare

func ReviewCompare(ctx context.Context, bootstrap *BootstrapResult, opts ReviewOptions) (ReviewResult, error)

Jump to

Keyboard shortcuts

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