Git Product home page Git Product logo

document-chat-api's Introduction

Document Chat API

The Document Chat API is a powerful tool that allows users to upload documents and chat with them, integrating directly with a SQL database to fetch relevant data for answering questions. This API uses advanced AI techniques to parse and understand both the document contents and database records to provide comprehensive answers.

Features

  • Document Interaction: Users can upload documents and ask questions based on the content.
  • SQL Database Integration: Connects to a SQL database to use stored data in answering user queries.
  • Flexible Deployment: Includes a Dockerfile for containerized deployment.

Prerequisites

  • Docker installed on your machine (optional)
  • Python 3.8 or higher if running locally

Installation

Running with Docker

  1. Clone the repository:
git clone https://github.com/abdulzain6/Document-Chat-API.git
cd Document-Chat-API
  1. Build and run the Docker container:
docker build -t document-chat-api .
docker run -p 8000:8000 document-chat-api

Local Setup

  1. Install the required Python packages:
pip install -r requirements.txt

Configuration

Configure the API by setting the following environment variables:

OPENAI_API_KEY=your_openai_api_key_here
DB_HOST=your_database_host
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_NAME=your_database_name
DB_TABLE_NAMES=comma_separated_list_of_table_names

Usage

Start the API server (if not using Docker):

python api.py

Users can now upload documents and interact via the API endpoints to ask questions and receive answers based on the uploaded documents and connected SQL database data.

Contributing

Contributions are highly encouraged. Please fork this repository, make your changes, and submit a pull request.

document-chat-api's People

Contributors

abdulzain6 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.