PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 7.7.1
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v7.7.1
8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 8.5.3 All 534 releases
chatbot / includes / integration / gemini / admin / settings.php

settings.php in WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services 7.7.1, at includes/integration/gemini/admin/settings.php

184 lines 13.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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="dashicons dashicons-admin-home"></i><?php echo esc_html__('Gemini settings', 'chatbot'); ?></a></li>
7 <li><a data-toggle="tab" href="#wp-chatbot-gemini-rag"><i class="dashicons dashicons-admin-generic"></i><?php echo esc_html__('RAG', 'chatbot'); ?></a></li>
8 <li><a data-toggle="tab" href="#wp-chatbot-gemini-help"><i class="dashicons dashicons-editor-help"></i><?php echo esc_html__('Gemini Help', 'chatbot'); ?></a></li>
9 </ul>
10
11 <div class="tab-content">
12 <div id="wp-chatbot-gemini-settings" class="tab-pane in active">
13 <div class="col-sm-12">
14
15 <div class="row gx-0">
16 <div class="mb-3">
17 <div class="form-check form-switch my-4">
18 <input class="form-check-input" type="checkbox" <?php echo (get_option('qcld_gemini_enabled') == 1) ? esc_attr('checked','chatbot') :'';?> role="switch" value="" id="<?php esc_attr_e('qcld_gemini_enabled','chatbot'); ?>">
19 <label class="form-check-label" for="<?php esc_attr_e('qcld_gemini_enabled','chatbot'); ?>">
20 <?php esc_html_e('Enable Gemini AI','chatbot'); ?><span style="color:red"> <?php esc_html_e('(if you want results from Gemini only, disable Site Search from Settings->Start Menu)','chatbot'); ?></span>
21 </label>
22 </div>
23 </div>
24 </div>
25 <div class="row gx-0">
26 <div class="form-check form-switch my-4">
27 <input class="form-check-input" type="checkbox" <?php echo (get_option('gemeni_context_awareness_enabled') == '1') ? esc_attr( 'checked','chatbot') :'';?> role="switch" value="" id="gemini_is_context_awareness_enabled">
28 <label class="form-check-label" for="gemini_is_context_awareness_enabled">
29 <?php esc_html_e( 'Context awareness','chatbot'); ?>
30 </label>
31
32 </div>
33 </div>
34 <div class="row gx-0">
35 <div class="mb-3">
36 <div class="form-check form-switch my-4">
37 <input class="form-check-input" type="checkbox" <?php echo (get_option('qcld_gemini_page_suggestion_enabled') == '1') ? esc_attr( 'checked','chatbot') :'';?> role="switch" value="" id="qcld_gemini_page_suggestion_enabled">
38 <label class="form-check-label" for="<?php esc_attr_e( 'qcld_gemini_page_suggestion_enabled','chatbot'); ?>">
39 <?php esc_html_e( 'Enable page suggestions with Gemini Result','chatbot'); ?>
40 </label>
41 </div>
42
43 <!-- POST TYPE -->
44 <div class="form-check form-switch my-4">
45 <label><?php esc_html_e( 'Select POST TYPE(s) to include with search results', 'chatbot' ); ?></label>
46 <div id="wp-chatbot-post-converter">
47 <ul class="checkbox-list">
48 <?php
49 $get_cpt_args = array(
50 'public' => true,
51 );
52 $post_types = get_post_types($get_cpt_args, 'object');
53 foreach ($post_types as $post_type) {
54 if ($post_type->name != 'attachment') {
55 $is_pro = !in_array($post_type->name, ['post', 'page']);
56 ?>
57 <div class="form-check form-check-inline">
58 <input
59 id="site_gemini_search_posttypes_<?php echo esc_html( $post_type->name ); ?>"
60 type="checkbox"
61 name="site_gemini_search_posttypes[]"
62 value="<?php echo esc_html( $post_type->name ); ?>"
63 <?php echo (($is_pro) ? 'disabled' : ''); ?>
64
65 <?php echo ((get_option('qcld_openai_relevant_post') != '') && in_array($post_type->name, get_option('qcld_openai_relevant_post'))) ? 'checked' : ''; ?>>
66 <label class="form-check-label <?php echo ($is_pro ? 'pro-locked' : ''); ?>" for="site_gemini_search_posttypes_<?php echo esc_html( $post_type->name ); ?>">
67 <?php echo esc_html( $post_type->name ); ?>
68 <?php if ($is_pro) { ?>
69 <span class="pro-badge">Pro</span>
70 <?php } ?>
71 </label>
72 </div>
73 <?php
74 }
75 }
76 ?>
77 </ul>
78 </div>
79 </div>
80 <!-- /POST TYPE -->
81
82 </div>
83 </div>
84 <div class="row gx-0">
85 <div class="mb-3 form-check ">
86 <label for="qcld_gemini_api_key" class="form-label"><?php esc_html_e('Gemini API Key','chatbot');?></label>
87 <input type="password" class="form-control" id="qcld_gemini_api_key" name="qcld_gemini_api_key" placeholder="Enter your Gemini API Key" value="<?php echo esc_attr(get_option('qcld_gemini_api_key')); ?>">
88 <small class="form-text text-muted"><?php esc_html_e('Get your API key from https://gemini.ai/settings/keys','chatbot'); ?></small>
89 </div>
90 </div>
91 <div class="row g-0">
92
93 <div class="row gx-0">
94 <div class="mb-3 form-check ">
95 <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)','chatbot');?></label>
96 <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') ); ?>">
97
98 </div>
99 </div>
100
101 <div class="row gx-0">
102 <div class="mb-3 form-check ">
103 <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)','chatbot');?></label>
104 <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') ); ?>">
105
106 </div>
107 </div>
108 </div>
109 <div class="mb-3">
110 <a class="btn btn-success" id="qcld_save_gemini_setting"><?php esc_html_e('Save settings','chatbot');?></a>
111 </div>
112 </div>
113
114
115 </div>
116 <div id="wp-chatbot-gemini-rag" class="tab-pane">
117 <div class="col-sm-12">
118 <div class="wrap">
119 <h3>Gemini RAG Settings</h3>
120 <p>If you enable RAG, you must configure the <a id="ai-knowledge-base-tab-gemini" href="<?php echo admin_url('admin.php?page=wpbot_openAi#ai-knowledge-base-tab'); ?>">Knowledgebase</a> for Post types and other data to embed.</p>
121 <div class="form-check form-switch my-4">
122 <input class="form-check-input"
123 type="checkbox"
124 id="is_page_rag_enabled_gemini"
125 <?php echo (get_option('is_page_rag_enabled') == '1') ? 'checked' : ''; ?>>
126 <label class="form-check-label" for="is_page_rag_enabled_gemini">
127 Enable RAG
128 </label>
129 </div>
130 <div class="mb-3">
131 <a class="btn btn-success" id="save_setting"><?php esc_html_e( 'Save settings','chatbot');?></a>
132 </div>
133 </div>
134 <div class="qcld-row">
135 <div class="alert alert-info mt-20" role="alert">
136 <p><b><?php echo esc_html__( 'Fine Tuning VS GPT Assistants VS RAG:', 'wpchatbot' ); ?></b></p>
137 <p>
138 <?php echo esc_html__( 'We suggest using GPT Assistants or RAG instead of Fine Tuning as Fine Tuning requires a lot of properly formatted data and GPT Assistants are easier to set up. You can still use your website data to train the bot.', 'wpchatbot' ); ?>
139 </p></br>
140 <p>
141 <b><?php echo esc_html__( 'How to Use RAG in This Plugin:', 'wpchatbot' ); ?></b>
142 <ol>
143 <li><?php echo esc_html__( 'Enable RAG from the settings panel', 'wpchatbot' ); ?></li>
144 <li><?php echo esc_html__( 'Click “Embed All Selected Sources” button, after selecting the sources from the', 'wpchatbot' ); ?> <a href="<?php echo admin_url('admin.php?page=wpbot_openAi#ai-knowledge-base-tab'); ?>" target="_blank">knowledgebase tab</a></li>
145 <li><?php echo esc_html__( '(Optional) Upload PDFs or CSV files for embedding', 'wpchatbot' ); ?></li>
146 <li><?php echo esc_html__( 'The system automatically stores embeddings in the database', 'wpchatbot' ); ?></li>
147 <li><?php echo esc_html__( 'User questions will now be answered using your site’s knowledge base', 'wpchatbot' ); ?></li>
148 <li><?php echo esc_html__( 'You need to configure the OpenAI API key, AI Model and System Command under the main OpenAI Settings', 'wpchatbot' ); ?></li>
149 </ol>
150 <strong><?php echo esc_html__( 'You can update or re-embed content at any time without retraining.', 'wpchatbot' ); ?></strong>
151 </p>
152
153 </div>
154
155 </div>
156 </div>
157 </div>
158 <div id="wp-chatbot-gemini-help" class="tab-pane">
159 <div class="accordion" id="qcldopenaiaccordion">
160 <div class="card">
161 <div class="card-header" id="panelsStayOpen-headingZero-gemini">
162 <h2 class="mb-0">
163 <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">
164 <?php esc_html_e( 'Getting Started with gemini','chatbot');?>
165 </button>
166 </h2>
167 </div>
168 <div id="panelsStayOpen-collapseZero-gemini" class="collapse" aria-labelledby="panelsStayOpen-headingZero-gemini" data-parent="#qcldopenaiaccordion">
169 <div class="card-body-gemini">
170 <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.','chatbot');?></h5>
171 <h5><?php esc_html_e( 'All you have to do is add the Gemini API Key and select an Gemini Model.','chatbot');?></h5>
172 <h5><?php esc_html_e( 'Grab your OpenAI API key from','chatbot');?> <a href="https://gemini.ai/settings/keys">HERE</a></h5>
173 <p><?php esc_html_e( 'Please make sure that DialogFlow, OpenAI are Disabled if you want Gemini to work.','chatbot');?></p>
174 </div>
175 </div>
176 </div>
177
178
179
180 </div>
181 </div>
182 </div>
183 </div>
184