Skip to content

Implement AgentDBQA Class to Enhance Code Structure and Reusability and Dockerized Project using FastAPI - #26

Closed
Bucanero06 wants to merge 0 commit into
hwchase17:masterfrom
Bucanero06:master
Closed

Implement AgentDBQA Class to Enhance Code Structure and Reusability and Dockerized Project using FastAPI#26
Bucanero06 wants to merge 0 commit into
hwchase17:masterfrom
Bucanero06:master

Conversation

@Bucanero06

Copy link
Copy Markdown

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 Fix Issue #1100 langchain-ai/langchain#1101 (comment) 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

@Bucanero06
Bucanero06 marked this pull request as draft April 17, 2023 16:12
@Bucanero06

Copy link
Copy Markdown
Author

@Bucanero06 Bucanero06 closed this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant