Documentation
¶
Overview ¶
Package models provides implementations for different AI model clients
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaudeClient ¶
type ClaudeClient struct {
// contains filtered or unexported fields
}
ClaudeClient handles interactions with Claude API
func NewClaudeClient ¶
func NewClaudeClient(modelConfig *config.ModelConfig) (*ClaudeClient, error)
NewClaudeClient creates a new Claude client
func (*ClaudeClient) Execute ¶
func (c *ClaudeClient) Execute(promptContent string) (*ModelResponse, error)
Execute sends a prompt to Claude and returns the model response
type GeminiClient ¶
type GeminiClient struct {
// contains filtered or unexported fields
}
GeminiClient handles interactions with Google's Gemini API
func NewGeminiClient ¶
func NewGeminiClient(modelConfig *config.ModelConfig) (*GeminiClient, error)
NewGeminiClient creates a new Gemini client
func (*GeminiClient) Execute ¶
func (c *GeminiClient) Execute(promptContent string) (*ModelResponse, error)
Execute sends a prompt to Gemini and returns the model response
type ModelClient ¶
type ModelClient interface {
Execute(promptContent string) (*ModelResponse, error)
}
ModelClient defines the interface for AI model clients
type ModelError ¶
ModelError represents an error from a model execution with full context
func (*ModelError) Error ¶
func (e *ModelError) Error() string
func (*ModelError) Unwrap ¶
func (e *ModelError) Unwrap() error
type ModelFallbackResult ¶
type ModelFallbackResult struct {
Response *ModelResponse
Errors []ModelError
FinalModel string // The model that ultimately succeeded (if any)
}
ModelFallbackResult represents the result of a model execution with fallback attempts
type ModelResponse ¶
type ModelResponse struct {
Content string
Model string
PromptName string // Name of the prompt used
Variables map[string]string // Variables used in the prompt
Timestamp time.Time // When the response was generated
ExecutionID string // Unique execution identifier
}
ModelResponse represents a response from an AI model
func ExecuteModel ¶
func ExecuteModel(modelName string, promptContent string, variables map[string]string, modelParams string) (*ModelResponse, error)
ExecuteModel executes a prompt using the specified model and returns the response
type OpenAIClient ¶
type OpenAIClient struct {
// contains filtered or unexported fields
}
OpenAIClient handles interactions with OpenAI API
func NewOpenAIClient ¶
func NewOpenAIClient(modelConfig *config.ModelConfig) (*OpenAIClient, error)
NewOpenAIClient creates a new OpenAI client
func (*OpenAIClient) Execute ¶
func (c *OpenAIClient) Execute(promptContent string) (*ModelResponse, error)
Execute sends a prompt to OpenAI and returns the model response