Passing PDF or wesbite data to chatgpt for chatbots

Hello team i have been thinking of how to achieve this function, i want to be able to extract data from a pdf and allow the chatbot respond to questions basing on that given data without leaving the role… how has someone managed this?