There's all kinds of LM317 - they're made in different packages, they're made by different companies, usually the difference between them is the maximum input voltage and how well they handle heat (in linear regulators, the difference between input voltage and output voltage is turned to heat, and some packages are more resistant to heat, others have to heatsinked and kept cooler)
The formula to determine the output voltage is Vout = 1.25 x (1 + R2 / R1 ) but the R1 must be a value close to 100-120 ohms. Both 100 and 120 are standard resistor values so you can easily find these. So determine R2 with the formula, or use R2 = (Vout / 1.25 - 1 ) x R1 which for 4.5v and R1 = 120 ohm gives you about 312 ohm, which is not a standard value, but you can put two 620 ohm resistors in parallel to get 310 ohm and then get vOut = (310/120 + 1 ) x 1.25 = 4.48v Or you can put a standard 330ohm or a 100ohm and a 220 ohm in series to get 320 ohm and get about 4.55-4.6v at output.
150 ohm may work but in some cases and with some lm317 regulators it may randomly not work properly.
Read the datasheet and see the examples but keep in mind the examples are with LM117 which needs a 240 ohm resistor, while LM317 works with 100-120 ohm like I said:
http://www.ti.com/lit/ds/symlink/lm117.pdfAlso keep in mind that LM317 needs about 1.5-2v ABOVE the output voltage, to work properly so you'll need about 6-6.5v at the input to get 4.5v. There are other linear regulators that don't need as much input voltage, chips with 1117 (they're made by various companies, 1117 is like 317 in the LM317, a pretty much standard code) in the name for example would only need about 1-1.2v above 4.5v to work, for example.