Connection successful! AI Search Service is working correctly.
'; if ( isset( $validation_data['client'] ) ) { $client = $validation_data['client']; $used_total = intval( $client['used_total'] ?? 0 ); $total_limit = intval( $client['total_limit'] ?? 10000 ); $remaining = $total_limit - $used_total; echo 'Embeddings used: ' . esc_html( number_format( $used_total ) ) . ' / ' . esc_html( number_format( $total_limit ) ) . ' (' . esc_html( number_format( $remaining ) ) . ' remaining)
'; } echo ''; delete_transient( 'ai_search_validation_data' ); } } elseif ( $validation_status === 'invalid' ) { $error_data = get_transient( 'ai_search_validation_error' ); echo 'Connection failed!
'; if ( $error_data && isset( $error_data['details'] ) ) { echo '' . esc_html( $error_data['details'] ) . '
'; } echo 'Connection failed! Unable to reach AI Search Service. Please try again later.
Not registered. Please save your settings to register with the AI Search Service.
Settings saved successfully! AI Search Service registered.
AI Search Service is temporarily unavailable. Please try again later or use your own OpenAI API key instead.
Settings saved successfully!