| 1 |
|
| 2 |
|
| 3 |
<div class="card-body p-sm-0"> |
| 4 |
|
| 5 |
<ul class="nav nav-tabs"> |
| 6 |
<li class="active"><a data-toggle="tab" href="#wp-chatbot-gemini-settings"><i class="fa fa-cog"></i><?php echo esc_html__('Gemini settings', 'wpchatbot'); ?></a></li> |
| 7 |
<li><a data-toggle="tab" href="#wp-chatbot-gemini-help"><i class="fa fa-question-circle"></i><?php echo esc_html__('Gemini Help', 'wpchatbot'); ?></a></li> |
| 8 |
</ul> |
| 9 |
|
| 10 |
<div class="tab-content"> |
| 11 |
<div id="wp-chatbot-gemini-settings" class="tab-pane in active"> |
| 12 |
<div class="col-sm-12"> |
| 13 |
|
| 14 |
<div class="row gx-0"> |
| 15 |
<div class="mb-3"> |
| 16 |
<div class="form-check form-switch my-4"> |
| 17 |
<input class="form-check-input" type="checkbox" <?php echo (get_option('qcld_gemini_enabled') == 1) ? esc_attr('checked','wpbot') :'';?> role="switch" value="" id="<?php esc_attr_e('qcld_gemini_enabled','wpbot'); ?>"> |
| 18 |
<label class="form-check-label" for="<?php esc_attr_e('qcld_gemini_enabled','wpbot'); ?>"> |
| 19 |
<?php esc_html_e('Enable Gemini AI','wpbot'); ?><span style="color:red"> <?php esc_html_e('(if you want results from Gemini only, disable Site Search from Settings->Start Menu)','wpbot'); ?></span> |
| 20 |
</label> |
| 21 |
</div> |
| 22 |
</div> |
| 23 |
</div> |
| 24 |
<div class="row gx-0"> |
| 25 |
<div class="form-check form-switch my-4"> |
| 26 |
<input class="form-check-input" type="checkbox" <?php echo (get_option('gemeni_context_awareness_enabled') == '1') ? esc_attr( 'checked','wpbot') :'';?> role="switch" value="" id="gemini_is_context_awareness_enabled"> |
| 27 |
<label class="form-check-label" for="gemini_is_context_awareness_enabled"> |
| 28 |
<?php esc_html_e( 'Context awareness','wpbot'); ?> |
| 29 |
</label> |
| 30 |
|
| 31 |
</div> |
| 32 |
</div> |
| 33 |
<div class="row gx-0"> |
| 34 |
<div class="mb-3"> |
| 35 |
<div class="form-check form-switch my-4"> |
| 36 |
<input class="form-check-input" type="checkbox" <?php echo (get_option('qcld_gemini_page_suggestion_enabled') == '1') ? esc_attr( 'checked','wpbot') :'';?> role="switch" value="" id="qcld_gemini_page_suggestion_enabled"> |
| 37 |
<label class="form-check-label" for="<?php esc_attr_e( 'qcld_gemini_page_suggestion_enabled','wpbot'); ?>"> |
| 38 |
<?php esc_html_e( 'Enable page suggestions with Gemini Result','wpbot'); ?> |
| 39 |
</label> |
| 40 |
</div> |
| 41 |
|
| 42 |
<!-- POST TYPE --> |
| 43 |
<div class="form-check form-switch my-4"> |
| 44 |
<label><?php esc_html_e( 'Select POST TYPE(s) to include with search results', 'wpchatbot' ); ?></label> |
| 45 |
<div id="wp-chatbot-post-converter"> |
| 46 |
<ul class="checkbox-list"> |
| 47 |
<?php |
| 48 |
$get_cpt_args = array( |
| 49 |
'public' => true, |
| 50 |
); |
| 51 |
$post_types = get_post_types($get_cpt_args, 'object'); |
| 52 |
foreach ($post_types as $post_type) { |
| 53 |
if ($post_type->name != 'attachment') { |
| 54 |
$is_pro = !in_array($post_type->name, ['post', 'page']); |
| 55 |
?> |
| 56 |
<div class="form-check form-check-inline"> |
| 57 |
<input |
| 58 |
id="site_gemini_search_posttypes_<?php echo $post_type->name; ?>" |
| 59 |
type="checkbox" |
| 60 |
name="site_gemini_search_posttypes[]" |
| 61 |
value="<?php echo $post_type->name; ?>" |
| 62 |
<?php echo (($is_pro) ? 'disabled' : ''); ?> |
| 63 |
|
| 64 |
<?php echo ((get_option('qcld_openai_relevant_post') != '') && in_array($post_type->name, get_option('qcld_openai_relevant_post'))) ? 'checked' : ''; ?>> |
| 65 |
<label class="form-check-label <?php echo ($is_pro ? 'pro-locked' : ''); ?>" for="site_gemini_search_posttypes_<?php echo $post_type->name; ?>"> |
| 66 |
<?php echo $post_type->name; ?> |
| 67 |
<?php if ($is_pro) { ?> |
| 68 |
<span class="pro-badge">Pro</span> |
| 69 |
<?php } ?> |
| 70 |
</label> |
| 71 |
</div> |
| 72 |
<?php |
| 73 |
} |
| 74 |
} |
| 75 |
?> |
| 76 |
</ul> |
| 77 |
</div> |
| 78 |
</div> |
| 79 |
<!-- /POST TYPE --> |
| 80 |
|
| 81 |
</div> |
| 82 |
</div> |
| 83 |
<div class="row gx-0"> |
| 84 |
<div class="mb-3 form-check "> |
| 85 |
<label for="qcld_gemini_api_key" class="form-label"><?php esc_html_e('Gemini API Key','wpbot');?></label> |
| 86 |
<input type="password" class="form-control" id="qcld_gemini_api_key" name="qcld_gemini_api_key" placeholder="Enter your Gemini API Key" value="<?php esc_attr_e(get_option('qcld_gemini_api_key'),'wpbot'); ?>"> |
| 87 |
<small class="form-text text-muted"><?php esc_html_e('Get your API key from https://gemini.ai/settings/keys','wpbot'); ?></small> |
| 88 |
</div> |
| 89 |
</div> |
| 90 |
<div class="row g-0"> |
| 91 |
|
| 92 |
<div class="row gx-0"> |
| 93 |
<div class="mb-3 form-check "> |
| 94 |
<label for="qcld_gemini_prepend_content" class="form-label"><?php esc_html_e('Your Prompt to be Added before the User Query for Customized Results (Optional)','wpbot');?></label> |
| 95 |
<input type="text" class="form-control" id="qcld_gemini_prepend_content" name="qcld_gemini_prepend_content" placeholder="Content for the response" value="<?php echo esc_attr( get_option('qcld_gemini_prepend_content') ); ?>"> |
| 96 |
|
| 97 |
</div> |
| 98 |
</div> |
| 99 |
|
| 100 |
<div class="row gx-0"> |
| 101 |
<div class="mb-3 form-check "> |
| 102 |
<label for="qcld_gemini_append_content" class="form-label"><?php esc_html_e('Your Prompt to be Appended at the End of the User Query for Customized Results (Optional)','wpbot');?></label> |
| 103 |
<input type="text" class="form-control" id="qcld_gemini_append_content" name="qcld_gemini_append_content" placeholder="Content for the response" value="<?php echo esc_attr( get_option('qcld_gemini_append_content') ); ?>"> |
| 104 |
|
| 105 |
</div> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
<div class="mb-3"> |
| 109 |
<a class="btn btn-success" id="qcld_save_gemini_setting"><?php esc_html_e('Save settings','wpbot');?></a> |
| 110 |
</div> |
| 111 |
</div> |
| 112 |
|
| 113 |
|
| 114 |
</div> |
| 115 |
<div id="wp-chatbot-gemini-help" class="tab-pane"> |
| 116 |
<div class="accordion" id="qcldopenaiaccordion"> |
| 117 |
<div class="card"> |
| 118 |
<div class="card-header" id="panelsStayOpen-headingZero-gemini"> |
| 119 |
<h2 class="mb-0"> |
| 120 |
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapseZero-gemini" aria-expanded="true" aria-controls="panelsStayOpen-collapseZero-gemini"> |
| 121 |
<?php esc_html_e( 'Getting Started with gemini','wpbot');?> |
| 122 |
</button> |
| 123 |
</h2> |
| 124 |
</div> |
| 125 |
<div id="panelsStayOpen-collapseZero-gemini" class="collapse" aria-labelledby="panelsStayOpen-headingZero-gemini" data-parent="#qcldopenaiaccordion"> |
| 126 |
<div class="card-body-gemini"> |
| 127 |
<h5><?php esc_html_e( 'Gemini is an unified Interface or Aggregator for LLMs. You can choose from hundreds of different AI models from OpenAI to Deepseek or Claude to get AI responses.','wpbot');?></h5> |
| 128 |
<h5><?php esc_html_e( 'All you have to do is add the Gemini API Key and select an Gemini Model.','wpbot');?></h5> |
| 129 |
<h5><?php esc_html_e( 'Grab your OpenAI API key from','wpbot');?> <a href="https://gemini.ai/settings/keys">HERE</a></h5> |
| 130 |
<p><?php esc_html_e( 'Please make sure that DialogFlow, OpenAI are Disabled if you want Gemini to work.','wpbot');?></p> |
| 131 |
</div> |
| 132 |
</div> |
| 133 |
</div> |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
</div> |
| 138 |
</div> |
| 139 |
</div> |
| 140 |
|