Actually, AJAX and websockets are two different categories. AJAX is a concept, a technique. With AJAX, you can perform (as indicated in the abbreviation) asynchronous requests, so the browser does not need to reload / refresh the entire page. This is good for different things, for example. validation form input. Websockets is a protocol technically the same as http if the connection is not closed after the transfer. This is good for things where the web server may need to contact the client (http cannot do this), for example, an example of a forwarding service (chat or email client, where you want to update the user interface, even if the user does not refresh the page or games). And it kills the http overhead, since all this needs to be done only once at the beginning.
So, they are for different purposes, even if they overlap. For your autocompletion, I think this will not affect performance. And this is even an action / reaction, so the user enters or transmits (independently) what can cause the request, and the server responds.
source share