How to have user history in the query model

I have a two-tower model. Query model has info about the users such as user id and gender, and candidate model has item-related information item id, description etc.
How can I add user’s history (what item they viewed before) to the query model? How to integrate the item embeddings as history to the query model?