The invention in this patent application relates to compounds represented generally by formula (I), which possess activities as inhibitors of the PD-1/PD-L1 interactions and therefore may potentially be useful in the treatment of cancer as well as infectious diseases such as hepatitis C. T-cells or lymphocytes are white blood cells that are essential for the immune system. They are capable of searching for and destroying infected and/or cancerous cells. Programmed death protein! (PD-1), also known as cluster of differentiation 279 (CD279), is a cell surface receptor on the T cells. The binding of PD-1 with either one of its two known ligands, programmed death-ligands 1 and 2 (PD-L1 or PD-L2), has been shown to suppress T cell receptor activating signals. The PD-1/PD-L1 pathway down regulates the immune responses during resolution of an infection or a tumor, or during the development of self-tolerance. Studies have shown that blocking the PD-1/PD-L1 interactions using antibodies to the PD-L1 protein restores and augments T cell activation in many systems. A recent study has shown that therapy with a monoclonal antibody to PD-L1 benefited patients with advanced cancer. Blocking the PD-1/PD-L1 pathway by monoclonal antibodies enhanced the immune response and resulted in tumor rejection or control of infection in preclinical animal models. It can also restore in vitro antigen-specific functionality to T cells from HIV, HCV, or HBV patients. Other reports show that blocking the PD-1/PD-L1 interaction enhances T cell activity in chronic infection systems and may augment therapeutic immune response to a number of histologically distinct tumors. It also enhances the responses to vaccination, including therapeutic vaccination in chronic infections. The term "T cell exhaustion" describes the conditions of the T cells resulting from chronic antigen stimulation that occurs during chronic infections and tumor disease. These cells are characterized by elevated levels of PD-1 and dysfunctional activities toward chronic antigen. Targeting PD-L1 protein to inhibit the PD-1/PD-L1 pathway has been shown to restore antigen-specific T cell immune functions in vitro and in vivo, including enhanced responses to vaccination in the setting of tumor or chronic infection. The inhibition of the interaction of PD-L1 with PD-1 is thus a viable and promising therapeutic target for the treatment of cancer and/or chronic infections. The invention in this patent application presents compounds with activities as inhibitors of the PD-1/PD-L1 protein/protein interactions. These compounds may potentially be useful therapy to enhance immunity in patients with cancer or chronic infections.