I doubt that this is possible. Given a state $|\phi\rangle$, we have no method for distinguishing it from $e^{i\varphi}|\phi\rangle$ for any phase $\varphi$. This means that we have no way of distinguishing between
$$\langle\psi|\phi\rangle\qquad \mathrm{vs.}\qquad e^{i\varphi}\langle\psi|\phi\rangle.$$ Specifically, we can choose $\varphi$ such that
$$e^{i\varphi}\langle\psi|\phi\rangle=|\langle\psi|\phi\rangle|.$$ We thus should be precluded from measuring anything other than this absolute value.
To get around this constraint, we would need to set up a superposition of $|\phi\rangle$ and $|\psi\rangle$ like $$|\Psi\rangle\propto |\psi\rangle+|\phi\rangle.$$ Only then could we get around the global phase problem. I would be interested in seeing a circuit that can take $$|0\rangle|\psi\rangle|\phi\rangle\to|\Psi\rangle|a\rangle|b\rangle$$ for any generalized ancilla $|0\rangle$ and final states $|a\rangle$ and $|b\rangle$. If I had to guess, I would say that it is impossible to perform this transformation with a fixed relative phase in $|\Psi\rangle$. We might be happy saying that
$$|0\rangle|\psi\rangle|\phi\rangle\to\frac{|\psi\rangle+|\phi\rangle}{\mathcal{N}}|a\rangle|b\rangle$$ for some normalization constant $\mathcal{N}$, but then we would need to also be happy with the transformation
$$|0\rangle|\psi\rangle e^{i\varphi}|\phi\rangle\to\frac{|\psi\rangle+e^{i\varphi}|\phi\rangle}{\mathcal{N}}|a\rangle|b\rangle,$$ but that is nonsensical for the same deterministic transformation, because the initial states $|0\rangle|\psi\rangle |\phi\rangle$ and $|0\rangle|\psi\rangle e^{i\varphi}|\phi\rangle$ are indistinguishable.