Title: Implement AgentDBQA Class to Enhance Code Structure and Reusability and Dockerized Project using FastAPI
Description:
This pull request introduces the AgentDBQA class, which streamlines code organization and improves reusability across the project, Dockerfile included and passing
The changes made in this pull request include:
Update of the README.md file to incorporate the latest changes, including sections on how to use the repo through Docker.
Creation of the AgentDBQA class, which consolidates previously separate functions into a cohesive class. The class consists of methods for loading Notion data, splitting documents, creating a vector store, loading a FAISS index, and loading a vector store.
Refactoring of existing code in the following files to use the new AgentDBQA class:
streamlit_example.py: Updated the Streamlit frontend to employ the AgentDBQA class for handling user input and generating responses.
ask_question.py: Modified the script to work seamlessly with the AgentDBQA class when querying the Notion database.
Development of a test suite for the AgentDBQA class using Python's unittest module. This test suite covers all methods within the AgentDBQA class and ensures their proper functioning.
Pull request would interfere but not problematic with https://github.com/hwchase17/notion-qa/pull/5 --> specifies langchain==0.0.81 in requirement.txt to fix the same problem i use my fix-openai-langchain.py for
Title: Implement AgentDBQA Class to Enhance Code Structure and Reusability and Dockerized Project using FastAPI
Description:
This pull request introduces the AgentDBQA class, which streamlines code organization and improves reusability across the project, Dockerfile included and passing
The changes made in this pull request include:
Update of the README.md file to incorporate the latest changes, including sections on how to use the repo through Docker.
Creation of the AgentDBQA class, which consolidates previously separate functions into a cohesive class. The class consists of methods for loading Notion data, splitting documents, creating a vector store, loading a FAISS index, and loading a vector store.
Refactoring of existing code in the following files to use the new AgentDBQA class:
streamlit_example.py: Updated the Streamlit frontend to employ the AgentDBQA class for handling user input and generating responses. ask_question.py: Modified the script to work seamlessly with the AgentDBQA class when querying the Notion database. Development of a test suite for the AgentDBQA class using Python's unittest module. This test suite covers all methods within the AgentDBQA class and ensures their proper functioning.
I kept running into errors along the lines of issue of issue #1100, i did note your comment https://github.com/hwchase17/langchain/pull/1101#issuecomment-1433903231 but since I didnt want to change much I included the changes to langcain's openai.py file in --> https://github.com/Bucanero06/notion-qa-model/blob/fea19537ab412b028a39b92bf4e7596d0c173898/fix-openai-langchain.py The Dockerfile gets a copy of the fixed file's content onto the original openai.py. Let me know of any feedback or dependencies for the merge.
P.S. my first pull request ever so lay it on me