PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 8.8.3
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v8.8.3
8.8.3 8.8.2 8.8.1 8.8.0 8.7.9 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 All 539 releases
chatbot / includes / integration / claude / admin / settings.php

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

178 lines 8.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * AI Admin Template
4 *
5 * @package Botmaster
6 * @since 14.8.2
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13
14
15 <div class="card-body p-sm-0">
16
17 <ul class="nav nav-tabs">
18 <li class="active"><a data-toggle="tab" href="#wp-chatbot-claude-settings"><?php echo esc_html__( 'Claude AI settings', 'chatbot' ); ?></a></li>
19 <li><a data-toggle="tab" href="#wp-chatbot-claude-help"><?php echo esc_html__( 'Claude AI Help', 'chatbot' ); ?></a></li>
20 </ul>
21
22 <div class="tab-content">
23
24 <div id="wp-chatbot-claude-settings" class="tab-pane in active">
25 <div class="row gx-0">
26 <div class="mb-3">
27 <div class="form-check form-switch my-4">
28 <input class="form-check-input" type="checkbox" <?php echo ( get_option( 'qcld_claude_enabled' ) == 1 ) ? esc_attr( 'checked' ) : ''; ?> role="switch" value="" id="qcld_claude_enabled">
29 <label class="form-check-label" for="qcld_claude_enabled">
30 <?php esc_html_e( 'Enable Claude AI', 'chatbot' ); ?><span style="color:red"> <?php esc_html_e( '(if you want results from claude only, disable Site Search from Settings->Start Menu)', 'chatbot' ); ?></span>
31 </label>
32 </div>
33 </div>
34 </div>
35
36 <div class="row gx-0">
37 <div class="mb-3">
38 <div class="form-check form-switch my-4">
39 <input class="form-check-input" type="checkbox" <?php echo ( get_option( 'qcld_claude_stream_enabled' ) == 1 ) ? esc_attr( 'checked' ) : ''; ?> role="switch" value="" id="qcld_claude_stream_enabled">
40 <label class="form-check-label" for="qcld_claude_stream_enabled">
41 <?php esc_html_e( 'Enable Streaming', 'chatbot' ); ?>
42 </label>
43 </div>
44 </div>
45 </div>
46
47 <div class="row gx-0">
48 <div class="mb-3">
49 <div class="form-check form-switch my-4">
50 <input class="form-check-input" type="checkbox" <?php echo ( get_option( 'qcld_claude_rag_enabled' ) == 1 ) ? esc_attr( 'checked' ) : ''; ?> role="switch" value="" id="qcld_claude_rag_enabled">
51 <label class="form-check-label" for="qcld_claude_rag_enabled">
52 <?php esc_html_e( 'Enable Claude RAG', 'chatbot' ); ?>
53 </label>
54 </div>
55 </div>
56 </div>
57 <div class="row gx-0">
58 <div class="mb-3">
59 <div class="form-check form-switch my-4">
60 <input class="form-check-input" type="checkbox" <?php echo ( get_option( 'qcld_claude_page_suggestion_enabled' ) == '1' ) ? esc_attr( 'checked' ) : ''; ?> role="switch" value="" id="qcld_claude_page_suggestion_enabled">
61 <label class="form-check-label" for="qcld_claude_page_suggestion_enabled">
62 <?php esc_html_e( 'Enable page suggestions with claude Result', 'chatbot' ); ?>
63 </label>
64 </div>
65 <!-- POST TYPE -->
66 <div class="form-check form-switch my-4">
67 <label><?php esc_html_e( 'Select POST TYPE(s) to include with search results', 'chatbot' ); ?></label>
68 <div id="wp-chatbot-post-converter">
69 <ul class="checkbox-list">
70 <?php
71 $get_cpt_args = array(
72 'public' => true,
73 );
74 $post_types = get_post_types( $get_cpt_args, 'object' );
75 foreach ( $post_types as $post_type ) {
76 if ( $post_type->name != 'attachment' ) {
77 ?>
78 <div class="form-check form-check-inline">
79 <input
80 id="site_claude_search_posttypes_<?php echo esc_attr( $post_type->name ); ?>"
81 type="checkbox"
82 name="site_claude_search_posttypes[]"
83 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' : ''; ?>>
84 <label class="form-check-label" for="site_claude_search_posttypes_<?php echo esc_attr( $post_type->name ); ?>"> <?php echo esc_html( $post_type->name ); ?></label>
85 </div>
86 <?php
87 }
88 }
89 ?>
90 </ul>
91 </div>
92 </div>
93 <!-- /POST TYPE -->
94 </div>
95 </div>
96 <div class="row gx-0">
97 <div class="form-group mb-3">
98 <label for="qcld_claude_api_key" class="form-label"><?php esc_html_e( 'Claude API Key', 'chatbot' ); ?></label>
99 <div class="input-group">
100 <input type="password" class="form-control" id="qcld_claude_api_key" name="qcld_claude_api_key" placeholder="Enter your Claude API Key" value="<?php echo esc_attr( get_option( 'qcld_claude_api_key' ) ); ?>">
101 </div>
102 <small class="form-text text-muted"><?php esc_html_e( 'Get your API key from https://console.anthropic.com/', 'chatbot' ); ?> </small>
103 </div>
104 </div>
105 <div class="row gx-0">
106 <div class="form-group mb-3">
107 <label for="qcld_voyage_api_key" class="form-label"><?php esc_html_e( 'Voyage AI API Key (Required for RAG)', 'chatbot' ); ?></label>
108 <div class="input-group">
109 <input type="password" class="form-control" id="qcld_voyage_api_key" name="qcld_voyage_api_key" placeholder="Enter your Voyage AI API Key" value="<?php echo esc_attr( get_option( 'qcld_voyage_api_key' ) ); ?>">
110 </div>
111 <small class="form-text text-muted"><?php esc_html_e( 'Anthropic uses Voyage AI for embeddings. Get your Voyage API key from https://dash.voyageai.com/api-keys to use RAG with Claude.', 'chatbot' ); ?> </small>
112 </div>
113 </div>
114 <div class="row gx-0">
115 <div class="form-group mb-3">
116 <label for="qcld_claude_model" class="form-label"><?php esc_html_e( 'Select Claude Model', 'chatbot' ); ?></label>
117 <select class="form-control" id="qcld_claude_model" name="qcld_claude_model">
118 <?php
119 $models = array(
120 'claude-fable-5' => 'Claude Fable 5',
121 'claude-opus-4-8' => 'Claude Opus 4.8',
122 'claude-opus-4-7' => 'Claude Opus 4.7',
123 'claude-sonnet-4-6' => 'Claude Sonnet 4.6 (Latest Sonnet)',
124 'claude-opus-4-6' => 'Claude Opus 4.6',
125 'claude-haiku-4-5-20251001' => 'Claude Haiku 4.5',
126 'claude-sonnet-4-5-20250929' => 'Claude Sonnet 4.5',
127 );
128 $current_model = get_option( 'qcld_claude_model' );
129 if($current_model == 'claude-3-opus-latest') {
130 $current_model = 'claude-3-opus-20240229';
131 }
132 foreach($models as $key => $val) {
133 $selected = ($key == $current_model) ? 'selected' : '';
134 echo '<option value="' . esc_attr( $key ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $val ) . '</option>';
135 }
136 ?>
137 </select>
138 </div>
139 </div>
140 <div class="row g-0">
141 <div class="gx-0">
142 <div class="form-group mb-3">
143 <label for="qcld_claude_system_content" class="form-label"><?php esc_html_e( 'System Content for Claude (Optional)', 'chatbot' ); ?></label>
144 <textarea rows="5" class="form-control" id="qcld_claude_system_content" name="qcld_claude_system_content" placeholder="Content for the response"><?php echo esc_textarea( get_option( 'qcld_claude_system_content' ) ); ?></textarea>
145 </div>
146 </div>
147 <div class="gx-0">
148 <div class="form-group mb-3">
149 <label for="qcld_claude_prepend_content" class="form-label"><?php esc_html_e( 'Your Prompt to be Added before the User Query for Customized Results (Optional)', 'chatbot' ); ?></label>
150 <textarea rows="5" class="form-control" id="qcld_claude_prepend_content" name="qcld_claude_prepend_content" placeholder="Content for the response"><?php echo esc_textarea( get_option( 'qcld_claude_prepend_content' ) ); ?></textarea>
151
152 </div>
153 </div>
154 <div class="gx-0">
155 <div class="form-group mb-3">
156 <label for="qcld_claude_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>
157 <textarea rows="5" class="form-control" id="qcld_claude_append_content" name="qcld_claude_append_content" placeholder="Content for the response"><?php echo esc_textarea( get_option( 'qcld_claude_append_content' ) ); ?></textarea>
158
159 </div>
160 </div>
161 <div class="form-group mb-3">
162 <a class="btn btn-success" id="qcld_save_claude_setting"><?php esc_html_e( 'Save settings', 'chatbot' ); ?></a>
163 </div>
164 </div>
165 </div>
166 <div id="wp-chatbot-claude-help" class="tab-pane">
167 <?php
168 require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/claude/admin/help.php';
169 ?>
170 </div>
171 <div id="wp-chatbot-claude-rag" class="tab-pane">
172 <?php
173 require_once QCLD_wpCHATBOT_PLUGIN_DIR_PATH . 'includes/integration/claude/admin/rag-manager.php';
174 ?>
175 </div>
176 </div>
177 </div>
178