chore(repo): initialize Tradarr repository

Add the existing application baseline and repository documentation/ignore rules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 18:38:53 +01:00
commit 1b0625f91c
115 changed files with 18728 additions and 0 deletions

View File

@ -0,0 +1,35 @@
package ai
import (
"context"
"fmt"
)
// GenOptions permet de contrôler le comportement de génération par appel.
type GenOptions struct {
Think bool // active le mode raisonnement (Qwen3 /think)
NumCtx int // taille du contexte KV (0 = valeur par défaut du provider)
}
type Provider interface {
Name() string
Summarize(ctx context.Context, prompt string, opts GenOptions) (string, error)
ListModels(ctx context.Context) ([]string, error)
}
func NewProvider(name, apiKey, model, endpoint string) (Provider, error) {
switch name {
case "openai":
return newOpenAI(apiKey, model), nil
case "anthropic":
return newAnthropic(apiKey, model), nil
case "gemini":
return newGemini(apiKey, model), nil
case "ollama":
return newOllama(endpoint, model), nil
case "claudecode":
return newClaudeCode(model), nil
default:
return nil, fmt.Errorf("unknown provider: %s", name)
}
}