AI Config: default to Gemini and filter providers by API key
This commit is contained in:
@@ -81,7 +81,16 @@ class CandidateController extends Controller
|
||||
|
||||
return \Inertia\Inertia::render('Admin/Candidates/Show', [
|
||||
'candidate' => $candidate,
|
||||
'jobPositions' => \App\Models\JobPosition::all()
|
||||
'jobPositions' => \App\Models\JobPosition::all(),
|
||||
'ai_config' => [
|
||||
'default' => env('AI_DEFAULT_PROVIDER', 'ollama'),
|
||||
'enabled_providers' => array_filter([
|
||||
'ollama' => true, // Toujours dispo car local ou simulé
|
||||
'openai' => !empty(env('OPENAI_API_KEY')),
|
||||
'anthropic' => !empty(env('ANTHROPIC_API_KEY')),
|
||||
'gemini' => !empty(env('GEMINI_API_KEY')),
|
||||
], function($v) { return $v; })
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user