Coder Social home page Coder Social logo

mallahyari / ai-starter-kit Goto Github PK

View Code? Open in Web Editor NEW
32.0 1.0 9.0 10.08 MB

A Web app stack written in FastAPI, Qdrant, and React for creating AI projects

Python 20.36% HTML 3.33% CSS 2.80% TypeScript 18.47% JavaScript 55.03%
fastapi langchain langchain-python llms qdrant qdrant-vector-database question-answering rag reactjs retrieval-augmented-generation

ai-starter-kit's Introduction

AI Starter Kit

A minimal code base for creating AI apps to do Question Answering (QA) over PDF documents, completely locally.

This project is inspired by local-ai-stack. However, their stack is entirely javascript based, and I needed a python based backend, so decided to create this project.

ai-starter-kit-demo_3.mp4

Stack

How to get started

  1. Clone this repo:
git clone https://github.com/mallahyari/ai-starter-kit.git
  1. Install backend dependencies:
cd backend/app
pip install -r requirements.txt
  1. Install frontend dependencies:
cd frontend
npm install
  1. Start the Qdrant vector database (you need Docker). See here for other options information:
docker run -p 6333:6333 qdrant/qdrant
  1. Install Ollama Instructions are here

  2. Run the FastApi server (from inside backend directory):

python app/main.py
  1. Open a new terminal and start the React development server (from inside frontend):
npm start

Change Configurations

You can change configurations in .config file, such as the embedding model, chunk size, and chunk overlap. If you plan to use Qdrant Cloud, you can or you can create your own .env file and set necessary api keys.

Additional Use Cases

Although current app only support pdf files, it's very straightforward to add other types of files such as text files, etc. Also, you can easily add the open-ended chat in addition to QA over document use case.

Discussion and Contribution

If you have any comment or feedback, please don't hesitate to use the Discussions section and open a new topic. You can also reach out directly via Linkedin or Twitter

ai-starter-kit's People

Contributors

mallahyari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.