ltypes

package
v0.39.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	TimeoutSeconds: 30,
	MaxTokens:      1000,
}

DefaultConfig contains the default configuration values.

Functions

This section is empty.

Types

type AIProvider

type AIProvider string

AIProvider represents a supported LLM provider.

const (
	LLMProviderOpenAI AIProvider = "openai"
	LLMProviderGemini AIProvider = "gemini"
)

type AnalysisError

type AnalysisError struct {
	Provider  string `json:"provider"`
	Type      string `json:"type"`
	Message   string `json:"message"`
	Retryable bool   `json:"retryable"`
}

AnalysisError represents an error from LLM analysis.

func (*AnalysisError) Error

func (e *AnalysisError) Error() string

type AnalysisRequest

type AnalysisRequest struct {
	Prompt         string                 `json:"prompt"`
	Context        map[string]interface{} `json:"context"`
	MaxTokens      int                    `json:"max_tokens"`
	TimeoutSeconds int                    `json:"timeout_seconds"`
}

AnalysisRequest represents a request to analyze CI/CD pipeline data.

type AnalysisResponse

type AnalysisResponse struct {
	Content    string        `json:"content"`
	TokensUsed int           `json:"tokens_used"`
	Provider   string        `json:"provider"`
	Timestamp  time.Time     `json:"timestamp"`
	Duration   time.Duration `json:"duration"`
}

AnalysisResponse represents the response from an LLM analysis.

type Client

type Client interface {
	Analyze(ctx context.Context, request *AnalysisRequest) (*AnalysisResponse, error)
	GetProviderName() string
	ValidateConfig() error
}

Client defines the interface for LLM providers.

type Config

type Config struct {
	TimeoutSeconds int
	MaxTokens      int
}

Config holds the default configuration values.

Jump to

Keyboard shortcuts

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