feat: implement user management system and integrate AI services with Ollama and Gemini

This commit is contained in:
jeremy bayse
2026-06-21 00:12:37 +02:00
parent 648749a69a
commit b85c2ba5a1
17 changed files with 1074 additions and 7 deletions
@@ -39,6 +39,17 @@ class HandleInertiaRequests extends Middleware
'error' => fn () => $request->session()->get('error'),
],
'appName' => config('app.name'),
'ollamaAvailable' => cache()->remember('ollama_available', 15, function () {
try {
$url = rtrim(config('services.ollama.url', 'http://127.0.0.1:11434'), '/');
// Remplacement de localhost par 127.0.0.1 pour contourner les lenteurs de résolution DNS sur Windows
$url = str_replace('localhost', '127.0.0.1', $url);
$response = \Illuminate\Support\Facades\Http::timeout(2.0)->get($url);
return $response->successful();
} catch (\Exception $e) {
return false;
}
}),
];
}
}