@php use App\Helpers\Classes\ImageHelper; $items_per_page = 5; $total_items = $userOpenai->total(); $prompt_filters = [ 'all' => __('All'), 'favorite' => __('Favorite'), ]; $ai_tools = [ [ 'title' => 'Sketch to Image', 'desc' => 'Transform your ideas into reality.', 'icon' => ' ', 'color' => '#F1F1F0', ] + ImageHelper::toolShow('sketch_to_image'), [ 'title' => 'Reimagine', 'desc' => 'Generate similar variants easily.', 'icon' => ' ', 'color' => '#C2EBF8', ] + ImageHelper::toolShow('reimagine'), [ 'title' => 'Upscale', 'desc' => 'Enlarge your images by 4x easily.', 'icon' => ' ', 'color' => '#EDF4F2', ] + ImageHelper::toolShow('upscale'), [ 'title' => 'Replace BG', 'desc' => 'Change the background of anyimage.', 'icon' => ' ', 'color' => '#FEF3DE', ] + ImageHelper::toolShow('replace_background'), [ 'title' => 'Remove BG', 'desc' => 'Extract the main object/subject.', 'icon' => ' ', 'color' => '#DEFFEF', ] + ImageHelper::toolShow('remove_background'), [ 'title' => 'Remove Text', 'desc' => 'Change or remove text.', 'icon' => ' ', 'color' => '#F7DEFE', ] + ImageHelper::toolShow('remove_text'), ]; $ai_tools = array_filter($ai_tools, function ($tool) { return $tool['show']; }); $ai_tools = array_values($ai_tools); @endphp
@if (setting('dalle_hidden', 0) != 1) {{ __('DALL-E') }} @endif @if (setting('stable_hidden', 0) != 1) {{ __('Stable Diffusion') }} @endif @if (\App\Helpers\Classes\ApiHelper::setPiAPIKey()) @includeIf('midjourney::midjourney-tab') @endif @if (\App\Helpers\Classes\ApiHelper::setFalAIKey()) @includeFirst(['flux-pro::flux-pro-tab', 'panel.user.openai.includes.flux-pro-tab', 'vendor.empty']) @includeFirst(['ideogram::ideogram-tab', 'panel.user.openai.includes.ideogram-tab', 'vendor.empty']) @endif
@if (setting('dalle_hidden', 0) !== 1)

{{ __('Explain your idea') }}. | @if (setting('user_ai_image_prompt_library') === null || setting('user_ai_image_prompt_library')) @endif

@foreach (json_decode($openai->questions, false, 512, JSON_THROW_ON_ERROR) ?? [] as $question) @if ($question->type === 'textarea') @endif @endforeach {{ __('Generate') }}
{{ __('Advanced Settings') }}
@endif @if (\App\Helpers\Classes\ApiHelper::setPiAPIKey()) @includeIf('midjourney::midjourney-tab-body') @endif @if (\App\Helpers\Classes\ApiHelper::setFalAIKey()) @includeFirst(['flux-pro::flux-pro-tab-body', 'panel.user.openai.includes.flux-pro-tab-body', 'vendor.empty']) @includeFirst(['ideogram::ideogram-tab-body', 'panel.user.openai.includes.ideogram-tab-body', 'vendor.empty']) @endif @include('panel.user.openai_chat.components.prompt_library_modal')
@if (count($ai_tools) > 0)
@foreach ($ai_tools as $tool)
{!! $tool['icon'] !!}

{{ __($tool['title']) }}

{{ __($tool['desc']) }}

{{ $tool['title'] }}
@endforeach
@endif

{{ __('Result') }}

@foreach ($userOpenai->take($items_per_page) as $item)
request_id ? 'data-request-id=' . $item->request_id : '' }} >
{{ $item->response }}

{{ $item->input }}

@endforeach
@if ($userOpenai->count() > 0)
{{ __('Loading more') }} @foreach ([0, 1, 2] as $item) @endforeach
@endif
@push('script') @includeIf('midjourney::midjourney-script') @includeFirst(['flux-pro::flux-pro-script', 'panel.user.openai.includes.flux-pro-script', 'vendor.empty']) @includeFirst(['ideogram::ideogram-script', 'panel.user.openai.includes.ideogram-script', 'vendor.empty']) @endpush