Code Monkey home page Code Monkey logo

local-ai-stack's Introduction

Local AI Stack

Make it possible for anyone to run a simple AI app that can do document Q&A 100% locally without having to swipe a credit card ๐Ÿ’ณ. Based on AI Starter Kit.

Screen Shot 2023-10-30 at 10 20 17 PM

Have questions? Join AI Stack devs and find me in #local-ai-stack channel.

Stack

Quickstart

1. Fork and Clone repo

Fork the repo to your Github account, then run the following command to clone the repo:

git clone [email protected]:[YOUR_GITHUB_ACCOUNT_NAME]/local-ai-stack.git

2. Install dependencies

cd local-ai-stack
npm install

3. Install Ollama

Instructions are here

4. Run Supabase locally

  1. Install Supabase CLI
brew install supabase/tap/supabase
  1. Start Supabase

Make sure you are under /local-ai-stack directory and run:

supabase start

5. Fill in secrets

cp .env.local.example .env.local

Then get SUPABASE_PRIVATE_KEY by running

supabase status

Copy anon key and save it as SUPABASE_PRIVATE_KEY in .env.local

6. Generate embeddings

node src/scripts/indexBlogLocal.mjs

This script takes in all files from /blogs, generate embeddings using transformers.js, and store embeddings as well as metadata in Supabase.

7. Run app locally

Now you are ready to test out the app locally! To do this, simply run npm run dev under the project root and visit http://localhost:3000.

8. Deploy the app

If you want to take the local-only app to the next level, feel free to follow instructions on AI Starter Kit for using Clerk, Pinecone/Supabase, OpenAI, Replicate and other cloud-based vendors.

Refs & Credits

local-ai-stack's People

Contributors

dependabot[bot] avatar fmhall avatar jenniferli23 avatar jmorganca avatar nirantk avatar peterp avatar rajko-rad avatar sragss avatar sumanth001 avatar timqian avatar ykhli avatar zeke 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.