Easiest would honestly be just to use gpt api. You can literally fork a streamlit or chainlit app and run it locally and then use langchain for any further customization...ex:https://streamlit.io/gallery?category=llms
All of them are open source minus the gpt part so you can get a feel for how it works.
All of them are open source minus the gpt part so you can get a feel for how it works.