openchatai / OpenChat

LLMs custom-chatbots console ⚡
https://open.cx
MIT License
5.2k stars 639 forks source link

PDF upload, require a table change. #174

Closed lvalics closed 1 year ago

lvalics commented 1 year ago

PdfDataSource model does not have a ForeignKey relationship to the Chatbot model. This is why the Chatbot object does not have the pdf_data_sources attribute. To fix this, we need to use a line in pdf_data_sources.py that establishes the ForeignKey relationship and provide the correct related_name which is used to create the reverse relation from Chatbot to PdfDataSource.