Code Monkey home page Code Monkey logo

confusity-ai's Introduction

Confusity AI

Confusity AI is fork of Clarity AI - a simple perplexity.ai clone. Use the code for whatever you like! :)

Clarity AI

How It Works

Given a query, Clarity fetches relevant, up-to-date information from the on prem atlassian confluence installation and uses OpenAI's API or any other compatible API on top of any LLM to generate an answer.

The app works as follows:

  1. Get query from user
  2. Scrape Confluence for relevant webpages
  3. Parse webpages for text
  4. Build prompt using query + webpage text
  5. Call OpenAI API to generate answer
  6. Stream answer back to user

Requirements

Get OpenAI API key here. (optional)

Running Locally

  1. Clone repo
git clone https://github.com/rzrbld/confusity-ai
  1. Install dependencies
npm i
  1. Configure environment variables
Variable Default Value Description
CONFLUENCE_URL 'https://my_onprem_confluence.company.com/' URL of the Confluence server.
CONFLUENCE_TOKEN 'put_token_in_CONFLUENCE_TOKEN_env_variable' Token used for authentication with Confluence API.
OPENAI_URL 'http://my_local_llm_URI_or_openai_endpoint.company.com/v1/chat/completions' URL or endpoint for OpenAI API or any other compatible api such as oobabooga or FastChat
OPENAI_APIKEY 'put_openai_or_local_llm_token_here' API key for accessing the OpenAI compatible API.
OPENAI_MODEL 'fancy_pancy_llm_3.5turbo' Name of the OpenAI or compatible language model.
OPENAI_TEMP 0.0 Temperature parameter for OpenAI API (a double).
OPENAI_TOKENS 250 Number of tokens to use for OpenAI API (an integer).
  1. Run app
npm run dev

Run with docker

  1. Populate ENV variables in docker-compose

  2. Run app

docker compose -f docker-compose.yml build
docker compose -f docker-compose.yml up

Credits

Shoutout to Perplexity AI and Clarity AI for the inspiration. I highly recommend checking their products out.

This repo is meant to show people that you can build powerful apps like Perplexity even if you don't have a large, experienced team.

LLMs are amazing, and I hope Clarity inspires you to build something cool!

confusity-ai's People

Contributors

mckaywrigley avatar rzrbld avatar kledal avatar

Stargazers

Pavel Rehsetov 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.