feat: initialize project structure with SQLite database, crawler framework, and LLM-based JD analysis integration

This commit is contained in:
2026-08-12 01:13:53 -07:00
commit 51b9468737
27 changed files with 3422 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
package analyzer
import (
"context"
"fmt"
"strings"
"github.com/hireme/hireme/internal/config"
)
type AnalysisOutput struct {
MatchedHighlights []string `json:"matched_highlights"`
MissingHighlights []string `json:"missing_highlights"`
TailoringSuggestions []string `json:"tailoring_suggestions"`
}
type LLMAnalyzer interface {
AnalyzeJD(ctx context.Context, jobTitle, rawContent string) (*AnalysisOutput, error)
}
func NewAnalyzer(cfg *config.Config) (LLMAnalyzer, error) {
provider := strings.ToLower(cfg.LLMProvider)
switch provider {
case "gemini":
if cfg.GeminiAPIKey == "" {
return nil, fmt.Errorf("GEMINI_API_KEY is required for provider 'gemini'")
}
return NewGeminiAnalyzer(cfg.GeminiAPIKey), nil
case "deepseek":
if cfg.DeepSeekAPIKey == "" {
return nil, fmt.Errorf("DEEPSEEK_API_KEY is required for provider 'deepseek'")
}
return NewDeepSeekAnalyzer(cfg.DeepSeekAPIKey, cfg.DeepSeekBaseURL), nil
case "mock":
return NewMockAnalyzer(), nil
default:
return NewMockAnalyzer(), nil
}
}