2. For a regular octagon $A_{1} A_{2} A_{3} A_{4} A_{5} A_{6} A_{7} A_{8}$ with side length 1, if any two points $A_{i} A_{j}$ are chosen, then the maximum value of $\overrightarrow{A_{i} A_{j}} \cdot \overrightarrow{A_{1} A_{2}}$ is $\qquad$ .
2. $\sqrt{2}+1$ Detailed explanation: According to the geometric meaning of the dot product of vectors, we only need to look at the projection of the vector in the direction of $\overrightarrow{A_{1} \vec{A}_{2}}$.

