DocQuery
January 30, 2025 ยท View on GitHub
Overview
DocQuery is a comprehensive project consisting of both frontend and backend components. The frontend is built with Next.js and Tailwind CSS, providing a user-friendly interface to create powerful knowledge bases for LLMs using markdown documentation. The backend leverages FastAPI to provide endpoints for different agents built using the langgraph library and integrated into the FastAPI application using CopilotKitSDK.
Video: Click to view
Setup
Frontend
-
Clone the repository:
git clone https://github.com/md-abid-hussain/docquery.git cd docquery-frontend -
Install dependencies:
npm install -
Copy the example environment file and fill in the required values:
cp .env.example .env -
Start the development server:
npm run dev -
The application will be available at
http://localhost:3000.
Backend
-
Clone the repository:
git clone <repository-url> cd docquery-backend -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` -
Install dependencies:
pip install -r requirements.txt -
Copy the example environment file and fill in the required values:
cp .env.example .env -
Start the FastAPI server:
uvicorn app.main:app --reload -
The application will be available at
http://127.0.0.1:8000.
Features
Frontend
- GitHub Integration: Easily fetch repository details and select markdown files for ingestion.
- Markdown Processing: Ingest and process markdown files used for documentation or detailed explanations.
- Knowledge Base Creation: Build comprehensive knowledge bases for LLMs from your documentation.
- AI-Powered Insights: Leverage advanced LLMs to generate insights and answer queries based on your knowledge base.
Backend
Ingestion Agent
The Ingestion Agent is defined in agent.py. It consists of the following nodes:
Ingestion NodeVerify Ingestion Node
QA Agent
The QA Agent is defined in agent.py. It consists of the following nodes:
Retrieve NodeChat Node
API Endpoints
GET /: Returns a simple greeting message.POST /copilotkit: Endpoint for interacting with the agents.
Environment Variables
The application requires the following environment variables to be set:
Frontend
TOGETHER_AI_API_KEYDATABASE_URL
Backend
GOOGLE_API_KEYTOGETHER_API_KEYGITHUB_PERSONAL_ACCESS_TOKENMONGODB_ATLAS_CLUSTER_URI
These can be set in the respective .env files.
License
This project is licensed under the MIT License.
