Giter Site home page Giter Site logo

local-llama's Introduction

FAQ_bot

Create an FAQ bot that can be used in Slack and is trained on public + private data

Setup

Virtual Environment

Start virtual environment

python3 -m venv env
source env/bin/activate

install requirements

pip install -r requirements.txt --upgrade

Deactivate virtual environment

deactivate

Configure environment variables

There is a .env_sample file. Rename it to .env and fill in the values.

VectorDB

We'll run ChromaDB locally using Docker.

Install Docker

Follow the instructions here.

brew install docker-compose

Install chroma

Follow the instructions here.

git clone [email protected]:chroma-core/chroma.git

Run chroma

Start docker

cd chroma
docker-compose up -d --build

You will likely run into an error which requires updating your docker config

nano ~/.docker/config.json

Remove the following line to the file and run the docker-compose command again

"credSstore": "desktop"

Run chroma

Start docker, then go to the chroma folder and run

docker-compose up -d --build

Test chroma

The DB server is exposed to port 8000 on the host machine and we should be able to access it from the host machine at localhost:8000 . We can hit the heartbeat URL http://localhost:8000/api/v1/heartbeat to make sure the server is up and running. If you see a JSON with a nanosecond EPOC timestamp, you're all set!

LLM

Install LLM

We will run llama2 locally. Original instructions from this article

Just in case, updated instructions for an M2 are also here. There's quite a bit that no longer works in their documentation.

Test LLM

../../llama.cpp/main -m ../../llama/llama-2-7b-chat/ggml-model-f16_q4_0.gguf \
        -t 8 \
        -n 128 \
        -p 'The first man on the moon was '

Run

Get all the conent from zendesk using their API

python ./lib/get_zendesk_content.py

Train the model

Create the bot

python ./lib/main.py

local-llama's People

Contributors

francisbrero avatar

Watchers

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