props; $options = WaicUtils::getArrayValue($props['options'], 'api', array(), 2); $notShow = WaicUtils::getArrayValue($props, 'not_show', array('vision' => 1), 2); $variations = WaicUtils::getArrayValue($props['variations'], 'api', array(), 2); $defaults = WaicUtils::getArrayValue($props['defaults'], 'api', array(), 2); $readOnly = WaicUtils::getArrayValue($props, 'read_only') == 1; $tokens = WaicUtils::getArrayValue($variations, 'tokens', array(), 2); $registry = WaicUtils::getArrayValue($variations, 'model-registry', array(), 2); $registrySettings = WaicUtils::getArrayValue($registry, 'settings', array(), 2); $registryGroups = WaicUtils::getArrayValue($registry, 'group_labels', WaicUtils::getArrayValue($variations, 'provider-groups', array(), 2), 2); $capabilityFilters = WaicUtils::getArrayValue($registry, 'capability_labels', WaicUtils::getArrayValue($variations, 'capability-filters', array(), 2), 2); $modelOptions = WaicUtils::getArrayValue($variations, 'model-options', array(), 2); $imageModelOptions = WaicUtils::getArrayValue($variations, 'image-model-options', array(), 2); $curModels = array(); foreach ($variations['engines'] as $m => $v) { $var = $variations['model-fields'][$m]; //( 'open-ai' == $m ? 'model' : ( 'deep-seek' == $m ? 'deep_seek_model' : $m . '_model' ) ); $curModels[$m] = WaicUtils::getArrayValue($options, $var, $defaults[$var]); } /*$curModel = WaicUtils::getArrayValue($options, 'model', $defaults['model']); $curDeepSeekModel = WaicUtils::getArrayValue($options, 'deep_seek_model', $defaults['deep_seek_model']); $curGeminiModel = WaicUtils::getArrayValue($options, 'gemini_model', $defaults['gemini_model']);*/ $curEngine = WaicUtils::getArrayValue($options, 'engine', $defaults['engine']); $curImageEngine = WaicUtils::getArrayValue($options, 'image_engine', $defaults['image_engine']); $providerProfiles = WaicUtils::getArrayValue($props, 'provider_profiles', array(), 2); $providerMeta = WaicUtils::getArrayValue($variations, 'provider-meta', array(), 2); ?>

· $masked) { ?>
' . __('Explore this guide', 'ai-copilot-content-generator') . ' ' . __('to create an account and obtain your API key.', 'ai-copilot-content-generator')); ?>">
WaicUtils::getArrayValue($options, 'api_key', ''), 'attrs' => 'aria-hidden="true" autocomplete="off" class="waic-fake-password" placeholder="' . esc_attr__('Enter your Open AI Api key', 'ai-copilot-content-generator') . '"', )); ?>
' . __('Explore this guide', 'ai-copilot-content-generator') . ' ' . __('to create an account and obtain your API key.', 'ai-copilot-content-generator')); ?>">
WaicUtils::getArrayValue($options, 'gemini_api_key', ''), 'attrs' => 'aria-hidden="true" autocomplete="off" class="waic-fake-password" placeholder="' . esc_attr__('Enter your Gemini Api key', 'ai-copilot-content-generator') . '"', )); ?>
' . __('Explore this guide', 'ai-copilot-content-generator') . ' ' . __('to create an account and obtain your API key.', 'ai-copilot-content-generator')); ?>">
WaicUtils::getArrayValue($options, 'deep_seek_api_key', ''), 'attrs' => 'aria-hidden="true" autocomplete="off" class="waic-fake-password" placeholder="' . esc_attr__('Enter your DeepSeek Api key', 'ai-copilot-content-generator') . '"', )); ?>
' . __('Explore this guide', 'ai-copilot-content-generator') . ' ' . __('to create an account and obtain your API key.', 'ai-copilot-content-generator')); ?>">
WaicUtils::getArrayValue($options, 'claude_api_key', ''), 'attrs' => 'aria-hidden="true" autocomplete="off" class="waic-fake-password" placeholder="' . esc_attr__('Enter your Claude Api key', 'ai-copilot-content-generator') . '"', )); ?>
' . __('Explore this guide', 'ai-copilot-content-generator') . ' ' . __('to create an account and obtain your API key.', 'ai-copilot-content-generator')); ?>">
WaicUtils::getArrayValue($options, 'perplexity_api_key', ''), 'attrs' => 'aria-hidden="true" autocomplete="off" class="waic-fake-password" placeholder="' . esc_attr__('Enter your Perplexity Api key', 'ai-copilot-content-generator') . '"', )); ?>
' . __('Explore this guide', 'ai-copilot-content-generator') . ' ' . __('to create an account and obtain your API key.', 'ai-copilot-content-generator')); ?>">
WaicUtils::getArrayValue($options, 'openrouter_api_key', ''), 'attrs' => 'aria-hidden="true" autocomplete="off" class="waic-fake-password" placeholder="' . esc_attr__('Enter your OpenRouter Api key', 'ai-copilot-content-generator') . '"', )); ?>
WaicUtils::getArrayValue($registrySettings, 'remote_url', ''), 'attrs' => 'class="waic-model-registry-remote-url" placeholder="https://"', )); ?>
__('Auto-sync daily', 'ai-copilot-content-generator'), 'model_registry_live_discovery' => __('Provider live discovery', 'ai-copilot-content-generator'), 'model_registry_allow_preview' => __('Show preview models', 'ai-copilot-content-generator'), 'model_registry_allow_deprecated' => __('Show deprecated models', 'ai-copilot-content-generator'), 'model_registry_allow_limited' => __('Show limited models', 'ai-copilot-content-generator'), 'model_registry_allow_unverified_live' => __('Show unverified live models', 'ai-copilot-content-generator'), ); $registryCheckboxValues = array( 'model_registry_auto_sync' => 'auto_sync_enabled', 'model_registry_live_discovery' => 'provider_live_enabled', 'model_registry_allow_preview' => 'allow_preview', 'model_registry_allow_deprecated' => 'allow_deprecated', 'model_registry_allow_limited' => 'allow_limited', 'model_registry_allow_unverified_live' => 'allow_unverified_live', ); foreach ($registryCheckboxes as $field => $label) { ?>
WaicUtils::getArrayValue($registrySettings, $registryCheckboxValues[$field], 0, 1), )); ?>
$label) { ?>
$capabilityFilters, 'value' => '', 'attrs' => 'id="waicModelCapabilityFilter"', )); ?>
WaicUtils::getArrayValue($variations, 'engine-options', $variations['engines'], 2), 'value' => $curEngine, 'attrs' => 'id="waicEngineSelect"', )); ?>
WaicUtils::getArrayValue($modelOptions, 'open-ai', $variations['model']['open-ai'], 2), 'value' => $curModels['open-ai'], 'attrs' => 'data-engine="open-ai" class="waic-api-models-select"', )); ?>
WaicUtils::getArrayValue($modelOptions, 'deep-seek', $variations['model']['deep-seek'], 2), 'value' => $curModels['deep-seek'], 'attrs' => 'data-engine="deep-seek" class="waic-api-models-select"', )); ?>
WaicUtils::getArrayValue($modelOptions, 'gemini', $variations['model']['gemini'], 2), 'value' => $curModels['gemini'], 'attrs' => 'data-engine="gemini" class="waic-api-models-select"', )); ?>
WaicUtils::getArrayValue($modelOptions, 'claude', $variations['model']['claude'], 2), 'value' => $curModels['claude'], 'attrs' => 'data-engine="claude" class="waic-api-models-select"', )); ?>
WaicUtils::getArrayValue($modelOptions, 'perplexity', $variations['model']['perplexity'], 2), 'value' => $curModels['perplexity'], 'attrs' => 'data-engine="perplexity" class="waic-api-models-select"', )); ?>
WaicUtils::getArrayValue($modelOptions, 'openrouter', $variations['model']['openrouter'], 2), 'value' => $curModels['openrouter'], 'attrs' => 'data-engine="openrouter" class="waic-api-models-select"', )); ?>
WaicUtils::getArrayValue($options, 'custom_model_id', ''), 'attrs' => 'placeholder="' . esc_attr__('provider-model-id', 'ai-copilot-content-generator') . '"', )); ?>
__('Select', 'ai-copilot-content-generator')) + $embeddings; ?>
$embeddings, 'value' => WaicUtils::getArrayValue($options, 'embedding'), )); ?>
$variations['language'], 'value' => WaicUtils::getArrayValue($options, 'language', $defaults['language']), )); ?>
$variations['tone'], 'value' => WaicUtils::getArrayValue($options, 'tone', $defaults['tone']), )); ?>
WaicUtils::getArrayValue($options, 'vision', 0, 1), )); ?>
WaicUtils::getArrayValue($options, 'max_file_size', 5, 1), )); ?>
MB
WaicUtils::getArrayValue($options, 'common_language', 0, 1), )); ?>
WaicUtils::getArrayValue($options, 'human_style', 0, 1), )); ?>
WaicUtils::getArrayValue($options, 'temperature', $defaults['temperature']), 'min' => 0, 'max' => 2, 'step' => '0.01', 'hide-min-max' => 1, 'class' => ( $readOnly ? 'disabled' : '' ), )); ?>
WaicUtils::getArrayValue($options, 'tokens', $defaults['tokens']), 'min' => 1, 'max' => WaicUtils::getArrayValue($tokens, $realCurModel, 4096, 1), 'step' => '1', 'hide-min-max' => 1, 'class' => ( $readOnly ? 'disabled' : '' ), 'id' => 'waicApiTokens', )); ?>
WaicUtils::getArrayValue($options, 'pre_minute', $defaults['pre_minute']), 'min' => 1, 'max' => 80, 'step' => '1', 'hide-min-max' => 1, 'class' => ( $readOnly ? 'disabled' : '' ), )); ?>
array('open-ai' => 'Open AI', 'gemini' => 'Gemini', 'openrouter' => 'Open Router'), 'value' => $curImageEngine, 'attrs' => 'id="waicImageEngineSelect"', )); ?>
WaicUtils::getArrayValue($imageModelOptions, 'img_model', $variations['img_model'], 2), 'value' => WaicUtils::getArrayValue($options, 'img_model', $defaults['img_model']), )); ?>
WaicUtils::getArrayValue($imageModelOptions, 'gemini_img_model', $variations['gemini_img_model'], 2), 'value' => WaicUtils::getArrayValue($options, 'gemini_img_model', $defaults['gemini_img_model']), )); ?>
WaicUtils::getArrayValue($imageModelOptions, 'openrouter_img_model', $variations['openrouter_img_model'], 2), 'value' => WaicUtils::getArrayValue($options, 'openrouter_img_model', $defaults['openrouter_img_model']), )); ?>
WaicUtils::getArrayValue($options, 'top_p', $defaults['top_p']), 'min' => 0, 'max' => 1, 'step' => '0.01', 'hide-min-max' => 1, 'class' => ( $readOnly ? 'disabled' : '' ), )); ?>
WaicUtils::getArrayValue($options, 'top_k', $defaults['top_k']), 'min' => 1, 'max' => 10, 'step' => '1', 'hide-min-max' => 10, 'class' => ( $readOnly ? 'disabled' : '' ), )); ?>
WaicUtils::getArrayValue($options, 'frequency', $defaults['frequency']), 'min' => -2, 'max' => 2, 'step' => '0.01', 'hide-min-max' => 1, 'class' => ( $readOnly ? 'disabled' : '' ), )); ?>
WaicUtils::getArrayValue($options, 'presence', $defaults['presence']), 'min' => -2, 'max' => 2, 'step' => '0.01', 'hide-min-max' => 1, 'class' => ( $readOnly ? 'disabled' : '' ), )); ?>