After eight months of treatment in a mental health facility for bipolar disorder, Pat Solitano (Bradley Cooper) is released into the care of his father Patrizio (Robert De Niro) and mother Dolores (Jacki Weaver). His main focus is to reconcile with his estranged wife, Nikki (Brea Bee). She has moved away and obtained a restraining order against him after Pat had found her in the shower with another man and nearly beat him to death. His therapist, Dr. Patel (Anupam Kher), does his best to convince him to keep taking his medication, as a repeat of his violent outbursts might send him back to the clinic. But Pat tells him that he has a new outlook on life: he attempts to see the good, or silver linings, in all that he experiences.
At dinner with his friend Ronnie and his wife Veronica, Pat meets Veronica's sister Tiffany Maxwell (Jennifer Lawrence), a young widow with depression and relationship problems. Sparks fly between Pat and Tiffany and she tries to connect by offering casual sex, but Pat keeps focusing on getting Nikki back. Tiffany tries to get closer to Pat and even offers to deliver a letter to Nikki if, in return, he will practice dancing with her (which she does as a therapy) and to partner with her in an upcoming dance competition. He reluctantly agrees and the two begin a rigorous practice regimen over the following weeks. Pat believes the competition will be a good way to show Nikki that he has changed and become a better person.
Patrizio hopes to open his own restaurant and has resorted to illegal bookmaking. Having put virtually all of his money on the outcome of a Philadelphia Eagles game, he asks Pat to attend as a "good-luck charm". Pat asks Tiffany for time off from practice to attend the game. She gives him a typed reply from Nikki, in which she cautiously hints there may be a chance for reconciliation between them if he continues his dance practice. Before he gets into the stadium, Pat gets involved in a fight when some racist fans harass the Indian fans there including his therapist Dr. Patel, and is hauled away by the police. The Eagles lose the game and Patrizio is furious. Tiffany shows up at their house and points out that the way she is "reading the signs," Philadelphia teams do better when she and Pat are together. Convinced, Patrizio makes a parlay with his gambling friend: if the Eagles win their next game and Tiffany and Pat score 5 out of 10 in their dance competition, he will win back double the money he lost on the first bet. Pat is reluctant, and Tiffany, Dolores and Patrizio conspire to persuade Pat to dance in the competition by telling him that Nikki will be there; it is revealed that his parents have secretly supported Tiffany's attempts to get along with him. Pat notices that the letter from Nikki also refers to "reading the signs" and realizes that Tiffany wrote it.
Tiffany, Pat, and their friends and family arrive at the competition on the night of the football game. Tiffany despairs when she finds that Nikki actually is in the audience, invited by Ronnie and Veronica who want Nikki and Pat to reconcile. Tiffany goes to the hotel bar and starts drinking. Pat finds her moments before their dance and drags her onto the dance floor. They begin their routine as the Eagles defeat the Dallas Cowboys. At the conclusion of their set, Tiffany and Pat score exactly 5 points. Amid cheers from friends and family and confused looks from the crowd, Pat approaches Nikki and speaks quietly into her ear. Tiffany sees this and runs off. Pat leaves Nikki behind after a short conversation, and chases Tiffany. He hands her a letter, in which he admits that he knows she forged Nikki's letter and confesses that he loved her from the moment he met her, though it took him so long to come to terms with it. They share a kiss. Patrizio opens a restaurant with the money he has won, Pat and Tiffany become a couple, and both of them are no longer wearing their wedding rings.
Output: What was Pat treated for in the mental health facility?