PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.5.7
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.5.7
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 8.5.2 All 533 releases
chatbot / includes / integration / grok / admin / settings.php

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

105 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit; // Exit if accessed directly
3 /**
4 * AI Admin Template
5 *
6 * @package Botmaster
7 * @since 14.8.2
8 */
9 ?>
10
11 <div class="card-body p-sm-0">
12
13 <ul class="nav nav-tabs">
14 <li class="active"><a data-toggle="tab" href="#wp-chatbot-grok-settings"><?php echo esc_html__( 'Grok AI settings', 'chatbot'); ?></a></li>
15 <li><a data-toggle="tab" href="#wp-chatbot-grok-help"><?php echo esc_html__( 'Grok AI Help', 'chatbot'); ?></a></li>
16 </ul>
17
18 <div class="tab-content">
19 <div id="wp-chatbot-grok-settings" class="tab-pane in active">
20 <div class="row gx-0">
21 <div class="mb-3">
22 <div class="form-check form-switch my-4">
23 <input class="form-check-input" type="checkbox" <?php echo ( get_option( 'qcld_grok_enabled' ) == 1 ) ? esc_attr( 'checked' ) : ''; ?> role="switch" value="" id="qcld_grok_enabled">
24 <label class="form-check-label" for="qcld_grok_enabled">
25 <?php esc_html_e( 'Enable Grok AI', 'chatbot'); ?><span style="color:red"> <?php esc_html_e( '(if you want results from grok only, disable Site Search from Settings->Start Menu)', 'chatbot'); ?></span>
26 </label>
27 </div>
28 </div>
29 </div>
30 <div class="row gx-0">
31 <div class="mb-3">
32 <div class="form-check form-switch my-4">
33 <input class="form-check-input" type="checkbox" <?php echo ( get_option( 'qcld_grok_page_suggestion_enabled' ) == '1' ) ? esc_attr( 'checked' ) : ''; ?> role="switch" value="" id="qcld_grok_page_suggestion_enabled">
34 <label class="form-check-label" for="qcld_grok_page_suggestion_enabled">
35 <?php esc_html_e( 'Enable page suggestions with grok Result', 'chatbot'); ?>
36 </label>
37 </div>
38 <!-- POST TYPE -->
39 <div class="form-check form-switch my-4">
40 <label><?php esc_html_e( 'Select POST TYPE(s) to include with search results', 'chatbot'); ?></label>
41 <div id="wp-chatbot-post-converter">
42 <ul class="checkbox-list">
43 <?php
44 $get_cpt_args = array(
45 'public' => true,
46 );
47 $post_types = get_post_types( $get_cpt_args, 'object' );
48 foreach ( $post_types as $post_type ) {
49 if ( $post_type->name != 'attachment' ) {
50 ?>
51 <div class="form-check form-check-inline">
52 <input
53 id="site_grok_search_posttypes_<?php echo esc_attr( $post_type->name ); ?>"
54 type="checkbox"
55 name="site_grok_search_posttypes[]"
56 value="<?php echo esc_attr( $post_type->name ); ?>" <?php echo ( ( get_option( 'qcld_openai_relevant_post' ) != '' ) && in_array( $post_type->name, get_option( 'qcld_openai_relevant_post' ) ) ) ? 'checked' : ''; ?>>
57 <label class="form-check-label" for="site_grok_search_posttypes_<?php echo esc_attr( $post_type->name ); ?>"> <?php echo esc_html( $post_type->name ); ?></label>
58 </div>
59 <?php
60 }
61 }
62 ?>
63 </ul>
64 </div>
65 </div>
66 <!-- /POST TYPE -->
67 </div>
68 </div>
69 <div class="row gx-0">
70 <div class="form-group mb-3">
71 <label for="qcld_grok_api_key" class="form-label"><?php esc_html_e( 'Grok API Key', 'chatbot'); ?></label>
72 <input type="password" class="form-control" id="qcld_grok_api_key" name="qcld_grok_api_key" placeholder="Enter your Grok API Key" value="<?php echo esc_attr( get_option( 'qcld_grok_api_key' ) ); ?>">
73 <small class="form-text text-muted"><?php esc_html_e( 'Get your API key from https://grok.ai/settings/keys', 'chatbot'); ?></br><span style="color:red"><?php esc_html_e('It requires a paid Grok API plan', 'chatbot'); ?> </span></small>
74 </div>
75 </div>
76
77 <div class="row g-0">
78 <div class="gx-0">
79 <div class="form-group mb-3">
80 <label for="qcld_grok_system_content"><?php esc_attr_e( 'System Command or Prompt for RAG and OpenAI Direct (Use it to Instruct ChatGPT how to behave)', 'chatbot'); ?></label>
81 <textarea type="text" rows="5" class="form-control" id="qcld_grok_system_content" placeholder="<?php echo esc_attr( 'You are a helpful and intelligent assistant for the website "' . site_url() . '". Use live website data and the provided context to respond accurately and briefly. Stay relevant and do not introduce additional topics.' ); ?>"><?php echo esc_html( get_option( 'qcld_grok_system_content' ) ); ?></textarea><br>
82 <label><small><?php esc_html_e( "To set the ChatBot's tone and character set a system message according to your need", 'chatbot'); ?></small></label></br>
83 <label><small><?php esc_html_e( 'Example: You are a helpful and intelligent assistant for the website "' . site_url() . '". Use live website data and the provided context to respond accurately and briefly. Stay relevant and do not introduce additional topics.', 'chatbot'); ?></small></label>
84 </div>
85 </div>
86 <div class="form-group mb-3">
87 <a class="btn btn-success" id="qcld_save_grok_setting"><?php esc_html_e( 'Save settings', 'chatbot'); ?></a>
88 </div>
89 </div>
90 </div>
91 <div id="wp-chatbot-grok-help" class="tab-pane">
92 <?php
93 require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/grok/admin/help.php';
94 ?>
95 </div>
96 <div id="wp-chatbot-grok-rag" class="tab-pane">
97 <?php
98 // require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/grok/admin/rag-manager.php';
99 ?>
100 </div>
101 </div>
102 </div>
103
104
105