' . esc_html__( 'Configure API access and the bot user.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_behavior_settings_section_callback() { echo '' . esc_html__( 'Define how the bot behaves, its personality, and what triggers responses.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_context_settings_section_callback() { echo '' . esc_html__( 'Configure how the bot accesses local and remote information to provide contextually relevant answers.', 'ai-bot-for-bbpress' ) . '
'; } // Field Callbacks function ai_bot_api_key_callback() { $api_key = get_option( 'ai_bot_api_key' ); echo ''; echo '' . esc_html__( 'Enter your OpenAI API key.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_user_id_callback() { $user_id = get_option( 'ai_bot_user_id' ); echo ''; echo '' . esc_html__( 'Enter the WordPress User ID for the bot account.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_system_prompt_callback() { $prompt = get_option( 'ai_bot_system_prompt', 'You are a helpful forum assistant.' ); echo ''; echo '' . esc_html__( 'Define the base personality and role of the bot.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_custom_prompt_callback() { $prompt = get_option( 'ai_bot_custom_prompt' ); echo ''; echo '' . esc_html__( 'Add specific instructions to guide the bot\'s responses (e.g., formatting rules, tone adjustments). Appended to every request.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_temperature_callback() { $temperature = get_option( 'ai_bot_temperature', 0.5 ); echo ''; echo '' . esc_html__( 'Controls randomness (0.0 = deterministic, 1.0 = max creativity). Default: 0.5', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_trigger_keywords_callback() { $keywords = get_option( 'ai_bot_trigger_keywords', '' ); echo ''; echo '' . esc_html__( 'Comma-separated list of keywords that trigger the bot (case-insensitive). Mentioning the bot user always triggers it.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_local_search_limit_callback() { $limit = get_option( 'ai_bot_local_search_limit', 3 ); echo ''; echo '' . esc_html__( 'Max number of relevant posts/topics from this forum to use as context. Default: 3.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_remote_endpoint_url_callback() { $url = get_option( 'ai_bot_remote_endpoint_url', '' ); echo ''; echo '' . esc_html__( 'URL of the AI Bot for bbPress Helper plugin\'s REST endpoint on your remote site. Leave blank to disable remote context.', 'ai-bot-for-bbpress' ) . '
'; } function ai_bot_remote_search_limit_callback() { $limit = get_option( 'ai_bot_remote_search_limit', 3 ); echo ''; echo '' . esc_html__( 'Max number of relevant posts from the remote site to use as context. Default: 3.', 'ai-bot-for-bbpress' ) . '
'; } // Forum restriction callback function ai_bot_forum_restriction_callback() { $restriction_mode = get_option( 'ai_bot_forum_restriction', 'all' ); $allowed_forums = get_option( 'ai_bot_allowed_forums', array() ); echo '';
echo '
';
echo '';
echo '
' . esc_html__( 'No forums found. Create some forums in bbPress to enable forum restriction.', 'ai-bot-for-bbpress' ) . '
'; } } else { echo '' . esc_html__( 'bbPress functions not yet loaded. Please refresh the page.', 'ai-bot-for-bbpress' ) . '
'; } echo '' . esc_html__( 'Choose "Selected Forums Only" to restrict the bot to specific forums. This helps prevent spam and keeps the bot focused on professional sections.', 'ai-bot-for-bbpress' ) . '
'; echo '