Code Monkey home page Code Monkey logo

llm-chat-bot's Introduction

LLM Chat Bot

About

This is a basic chat bot written with LLAMA Hub indexers.

Using indexers we can supplement prompts with contextual information without retraining the LLM.

The current supported Indexers are:

  1. Wikipedia
  2. Confluence (coming soon!)

Usage

When using OpenAI API as the LLM backend, the environment variable {OPENAI_API_KEY} must be set to an application key generated at https://platform.openai.com/api-keys.

Help Text

% python app.py
usage: app.py [-h] [--openai] -p PAGES --index {wikipedia,confluence} [--speech]
app.py: error: the following arguments are required: -p/--pages, --index

Setup

Create environment and install dependencies

cd /path/to/clone
python3 -m venv .venv
pip install -r requirements.txt

Example

OPENAI_API_KEY="..." python app.py --openai --pages="Gareth_Knight" --index wikipedia

Output:

[Enter query and press ENTER]

> Who was Gareth Knight?
>> Gareth Knight was a British occultist, ritual magician, author, and publisher. He had a deep interest in magic from an early age and became an initiate of the Society of the Inner Light, founded by the occultist Dion Fortune. Knight was actively involved in the Society for a decade, serving as its librarian and editor. He later co-founded the Helios Book Service, which aimed to publish and distribute occult-related books. Knight left the Society in 1965 and went on to publish numerous books on various occult subjects, including Christian esotericism, tarot reading, Arthurian legends, Celtic mythology, and the occult influence on J.R.R. Tolkien's works. He also founded his own esoteric order, known as the Gareth Knight Group, and hosted annual conventions at Greystone. Knight rejoined the Society of the Inner Light in 1998 and became Fortune's biographer, as well as compiling collections of her unpublished works. He passed away in 2022 at the age of 91. <<
>

llm-chat-bot's People

Contributors

iancohee avatar

Watchers

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