Is it possible to create a chatbot that doesn't fall into an infinite loop under some restrictions?
If the computer can retain state between inputs (e.g., you're using an interactive Turing machine), then yes, you can avoid an infinite loop.

For instance, the machine can just have a counter that counts 1,2,3,4,5,...; it can then map the counter to a sentence.  When the counter is $i$, it can look up the $i$th bit of the binary expansion of pi; if this bit is even, it outputs "Not so good, and you?" and if it is odd, it outputs "Good, and you?".  Since the bits of pi never repeat, this will never repeat either.  There are other ways to do it as well; this is just one example.



To respond to the original version of the question: If invoke the Turing machine separately on each input string, then it will have no way to retain state across sentences.  In that case, no,  It's not possible.  By the pigeonhole principle, there will exist a loop.  The set of possible sentences is finite, so this will eventually enter a loop.

If you take any function $f:S \to S$ where $S$ is a finite set, and you pick a single starting point $x \in S$ and then compute the sequence $x,f(x),f(f(x)),\dots$, eventually some value must appear twice.  In particular, once you've looked at $n+1$ different values, each of which is selected from a set of size $n$, by the pigeonhole principle, there must be some value that appeared at least twice.  In other words, $f^i(x)=f^{i+r}(x)$ for some $i,r$.  This means that $f$ has entered a cycle: $f^{j+r}(x)=f^j(x)$ for all $j\ge i$.

Here $S$ represents the set of all sentences (there are finitely many of them), and $f$ represents the function computed by your chatbox (which accepts a single sentence on its input, and outputs a single sentence, and is deterministic).

Of course, with an appropriately constructed algorithm, it may take longer than the lifetime of the universe to enter a loop.  Nonetheless, mathematically, it will eventually loop.

Your specific example doesn't work: it can't be implemented by a deterministic function.  If on input "Good, and you?" it outputs "Not so good, and you?", then that's what it will always output on that input.  Thus, you can't have a Turing machine that on input "Good, and you?" will sometimes output "Not so good, and you?" and sometimes output "Good, and you?".  Code running on a Turing machine is deterministic and memoryless.