How to trigger the text_field_with_auto_complete after typing the 4
characters on the text box.can anyone please tell me how set this after
typing 4 characters.

If you want the widget to trigger the Ajax call only if 4 chars or
more were entered have a look at the :min_chars option: