6. Given that a line with slope $k$ is drawn through a focus of the ellipse $x^{2}+2 y^{2}=3$, intersecting the ellipse at points $A$ and $B$. If $AB=2$, then $|k|=$ $\qquad$ .
6. $\sqrt{1+\sqrt{3}}$.

It is known from the calculation that the parameters of the ellipse are $a=\sqrt{3}, b=c=\sqrt{\frac{3}{2}}$. Let the equation of the line be $y=k(x-c)$. Then the x-coordinates $x_{1}, x_{2}$ of points $A, B$ satisfy
$$
x^{2}+2 k^{2}(x-c)^{2}=3 \Rightarrow x_{1}+x_{2}=\frac{4 k^{2} c}{1+2 k^{2}} \text{. }
$$

The equation of the right directrix of the ellipse is $x=\frac{a^{2}}{c}=\sqrt{6}$, and from
$$
A B=\frac{c}{a}\left(2 \sqrt{6}-x_{1}-x_{2}\right),
$$

we solve to get $|k|=\sqrt{1+\sqrt{3}}$.