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.
Click to show internal directories.
Click to hide internal directories.