Fatty acids in the lumen of the duodenum, from the ingested food, stimulate endocrine cells to release the cholecystokinin (CCK). CCK stimulates contractions of the gallbladder. Also, acidic chyme (partly digested food) in the lumen of the duodenum stimulates other endocrine cells to release the secretin. Secretin stimulates duct cells in the liver to release bicarbonate into the bile.
Neural regulation is under the control of vagus nerve.