@extends('layouts.admin.app', ['page' => $menuAdmin['settings']['active'] ?? '', 'sub_page' => $menuAdmin['settings']['route']['ai']['sub_active'] ?? '']) @section('title', __('labels.ai_settings')) @section('header_data') @php $page_title = __('labels.ai_settings'); $page_pretitle = __('labels.admin') . ' ' . __('labels.settings'); @endphp @endsection @php $breadcrumbs = [ ['title' => __('labels.home'), 'url' => route('admin.dashboard')], ['title' => __('labels.settings'), 'url' => route('admin.settings.index')], ['title' => __('labels.ai_settings'), 'url' => null], ]; $providerCatalog = $providerCatalog ?? app(\App\Services\Ai\AiManager::class)->getProviderCatalog(); $currentProvider = $settings['aiProvider'] ?? 'gemini'; $currentModel = $settings['aiModel'] ?? 'gemini-3.8-flash'; $currentCustomModel = $settings['aiCustomModel'] ?? ''; $currentCustomBaseUrl = $settings['aiCustomBaseUrl'] ?? ''; $currentTemperature = $settings['aiTemperature'] ?? 0.7; $enableAi = !empty($settings['enableAiDescription']); @endphp @section('admin-content')
@csrf {{-- Card 1: Master Enable / Disable --}}

{{ __('labels.ai_description_generator') }}

{{ __('labels.ai_description_generator_subtitle') }}

{{-- Card 2: Provider & Model Selection --}}

{{ __('labels.ai_provider_model_configuration') }}

{{-- Provider Select --}}
{{ __('labels.ai_provider_hint') }}
{{-- Model Select --}}
{{ __('labels.ai_model_hint') }}
{{-- Custom Model Input (shown if custom provider is chosen or custom model is selected) --}}
{{ __('labels.custom_model_hint') }} {{-- Quick Preset Helper Chips --}}
Quick Presets (click to apply):
{{-- Custom Base URL (for Ollama, OpenRouter, LocalAI) --}}
{{ __('labels.custom_api_base_url_hint') }}
{{-- Creativity / Temperature Slider --}}
{{ $currentTemperature }}
0.0 (Factual & Precise) 0.7 (Balanced) 1.0 (Creative & Punchy)
{{-- Card 3: Provider API Credentials --}}

{{ __('labels.api_credentials') }}

{{-- Gemini Key --}}
Get an API key free at Google AI Studio.
{{-- OpenAI Key --}}
Obtain your API key from OpenAI Platform.
{{-- Claude Key --}}
Get your API key from Anthropic Console.
{{-- DeepSeek Key --}}
Get your API key from DeepSeek Platform.
{{-- Groq Key --}}
Fastest inference on Llama 3.3. Get your key at Groq Console.
{{-- Custom Key --}}
Leave blank if your local Ollama / LocalAI instance does not require an Authorization header.
{{-- Card 4: Live Connection Test & Diagnostics --}}

{{ __('labels.live_connection_test') }}

{{ __('labels.live_connection_test_hint') }}

{{-- Submit Button --}} @can('updateSetting', [\App\Models\Setting::class, 'ai'])
@endcan
@endsection @push('scripts') @endpush