Code Monkey home page Code Monkey logo

uibot's Introduction

AI Q&A Bot

This is an experiment, for reference only. Try here: https://newjersey.github.io/uibot/

example of UIbot

Q&A bot using LlamaIndex. This is a simple implementation using OpenAI's models, but the documentation contains extensive customization options (including changing the LLM).

Initial Setup

Install required packages by running:

pip install llama-index

Ongoing Operations

Loading Data and Creating index

Load the knowledge base files (such as pdf, jpg, png, docx, txt, csv) into the 'data' folder. Llama-index has support for third-party connectors as well.

Run the following whenever changes are made to the data folder to re-generate the knowledge base:

python createindex.py

Ask questions

To start a Q&A dialogue run the following:

python ask.py

Serverless API

  • set an env var using AWS SSM call openaiApiKey with an API key for OpenAI
  • deploy with serverless deploy, which will build required dependencies as a container and publish

Build index

  • make sure requirements are installed pip3 install -r requirements.txt
  • build index locally by setting env var OPENAI_API_KEY and running python3 createindex.py

Chatbot example

Downloading website content to index

wget -r -np -nd -E -A html,pdf https://nj.gov/labor/myleavebenefits/

uibot's People

Contributors

dhcole avatar gamorgana avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

ninest

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.