Documentation
¶
Index ¶
Constants ¶
const ( AIAnthropicProvider = "anthropic" AIClaudeProvider = "claude" AICopilotProvider = "copilot" AIDeepSeekProvider = "deepseek" AIGeminiProvider = "gemini" AIGitHubProvider = "github" AIGoogleProvider = "google" AIGrokProvider = "grok" AIHetznerProvider = "hetzner" AILocalProvider = "local" AIMetaProvider = "meta" AIMuseProvider = "muse" AIOllamaProvider = "ollama" AIOpenAIProvider = "openai" AIOpenRouterProvider = "openrouter" AIvLLMProvider = "vllm" AIXAIProvider = "xai" DefaultClaudeModel = "claude-sonnet-5" DefaultCopilotModel = "gpt-6-luna" DefaultDeepSeekModel = "deepseek-chat" DefaultGeminiModel = "gemini-4-hydrogen" DefaultHetznerModel = "meta-llama/Meta-Llama-3.1-70B-Instruct" DefaultLocalModel = "llama3.2" DefaultMuseModel = "muse-spark-1.3" DefaultOpenAIModel = "gpt-6-luna" DefaultOpenRouterModel = "google/gemini-4-hydrogen" DefaultXAIModel = "grok-2" DefaultClaudeBaseURL = "https://api.anthropic.com/v1" DefaultDeepSeekBaseURL = "https://api.deepseek.com" DefaultGeminiBaseURL = "https://generativelanguage.googleapis.com/v1beta" DefaultHetznerBaseURL = "https://inference.hetzner.com/api/v1" DefaultMuseBaseURL = "https://api.meta.ai/v1" DefaultOpenAIBaseURL = "https://api.openai.com/v1" DefaultOpenRouterBaseURL = "https://openrouter.ai/api/v1" DefaultXAIBaseURL = "https://api.x.ai/v1" AnthropicAPIVersion = "2023-06-01" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClaudeClient ¶
type ClaudeClient struct {
// contains filtered or unexported fields
}
func NewClaudeClient ¶
func NewClaudeClient(token, baseURL, model string) (*ClaudeClient, error)
NewClaudeClient creates a client targeting Anthropic Claude Messages REST API.
func (*ClaudeClient) BaseURL ¶
func (c *ClaudeClient) BaseURL() string
BaseURL returns the configured base URL.
func (*ClaudeClient) Summarize ¶
func (c *ClaudeClient) Summarize(ctx context.Context, prompt string, thinking string) (*SummaryResult, error)
type CopilotClient ¶
type CopilotClient struct {
// contains filtered or unexported fields
}
func NewCopilotClient ¶
func NewCopilotClient(token, model string) (*CopilotClient, error)
NewCopilotClient creates a client targeting the native GitHub Copilot API.
func (*CopilotClient) Summarize ¶
func (c *CopilotClient) Summarize(ctx context.Context, prompt string, _ string) (*SummaryResult, error)
type GeminiClient ¶
type GeminiClient struct {
// contains filtered or unexported fields
}
func NewGeminiAPIKeyClient ¶
func NewGeminiAPIKeyClient(apiKey, baseURL, model string) (*GeminiClient, error)
NewGeminiAPIKeyClient creates a new Gemini AI client targeting Google AI Studio authenticated via API key.
func NewGeminiClient ¶
func NewGeminiClient(ctx context.Context, saFile, project, location, model string) (*GeminiClient, error)
NewGeminiClient creates a new Gemini AI client authenticated via service account credentials.
func (*GeminiClient) BaseURL ¶
func (c *GeminiClient) BaseURL() string
BaseURL returns the configured base URL.
func (*GeminiClient) Project ¶
func (c *GeminiClient) Project() string
Project returns the resolved GCP project ID.
func (*GeminiClient) ResolveModel ¶
func (c *GeminiClient) ResolveModel(ctx context.Context, fallbackModel string) string
ResolveModel resolves a Gemini model name or shorthand against available models (cached for 12h), falling back to prefix normalization derived from fallbackModel, and updates the client's active model to the resolved ID.
func (*GeminiClient) Summarize ¶
func (c *GeminiClient) Summarize(ctx context.Context, prompt string, thinking string) (*SummaryResult, error)
type OpenAIClient ¶
type OpenAIClient struct {
// contains filtered or unexported fields
}
func NewOpenAIClient ¶
func NewOpenAIClient(token, baseURL, model string) (*OpenAIClient, error)
NewOpenAIClient creates a client targeting standard OpenAI or compatible REST endpoints.
func (*OpenAIClient) BaseURL ¶
func (c *OpenAIClient) BaseURL() string
BaseURL returns the configured base URL.
func (*OpenAIClient) Summarize ¶
func (c *OpenAIClient) Summarize(ctx context.Context, prompt string, _ string) (*SummaryResult, error)
type OpenRouterClient ¶
type OpenRouterClient struct {
// contains filtered or unexported fields
}
func NewOpenRouterClient ¶
func NewOpenRouterClient(token, baseURL, model string) (*OpenRouterClient, error)
NewOpenRouterClient creates a client targeting the OpenRouter Chat Completions API.
func (*OpenRouterClient) BaseURL ¶
func (c *OpenRouterClient) BaseURL() string
BaseURL returns the configured base URL.
func (*OpenRouterClient) Summarize ¶
func (c *OpenRouterClient) Summarize(ctx context.Context, prompt string, thinking string) (*SummaryResult, error)