Code Monkey home page Code Monkey logo

chatbot-ui's Introduction

Chatbot UI for flows.network

This project is derived from the Chatbot UI, a project by Mckay Wrigley. The original Chatbot UI allows you to enter API keys from cloud services (e.g., OpenAI and Azure) to chat with their LLMs. In this work, we allow it to:

  • Chat with any priviately deployed LLMs, including llama2 models,
  • Customize prompts, system prompts, model selection, temperature, token limits and retry limits on the server so that users have a conssistent experience across clients,
  • Access vector databases, image processing, OCR, other AI models, and external web services,
  • Move auth management (API keys, tokens and LLM access endpoints) to the server side for better security.

See a demo of a Chatbot "fine tuned" with knowledge of the Rust programming. You can ask it questions related to Rust programming. For example, if you just say "help me write a simple web server", it will give an example in Rust language complete with instructions on how to run it!

We accomplished all these by moving some of the work to the server side. The Chatbot UI is now simply a UI. It posts every message the user enters to a server, and then displays the server response. On the server side, we have flows.network. You just need to deploy a "flow function" and configure it with your private LLM endpoints or OpenAI API keys.

In the HTTP request to the server, the Chatbot UI uses the x-conversation-id header to designated a conversation ID so that the server can keep track of multiple conversations.

The flow function is written in Rust. But do not worry, you can just reuse our template without writing a single line of code. Once you are familiar with the system, you can start to modify or write your own flow functions to customize the prompts or perform pre- post-processing work that are specific to your needs.

How to use it

  1. Deploy a flow function on flows.network. (see examples for ChatGPT and a private llama2 LLM)
  2. Copy the flow function's webhook URL in the form of https://code.flows.network/webhook/UNIQUE-FLOW-ID
  3. Load https://flows-chat-ui.vercel.app/?chat_url=https://code.flows.network/webhook/UNIQUE-FLOW-ID in your browser.

That's it!

Deploy your own front end UI

You can fork the project, customize the title, description and default webhook URL by environment variables, and then deploy it on Vercel for free.

Deploy with Vercel

Environment variable Value
SITE_TITLE Title of the deployed chatbot UI
SITE_DESC Description to display on the UI
CHAT_URL The webhook URL from the flow function

chatbot-ui's People

Contributors

adiestel avatar alanpog avatar anthonypuppo avatar aweshchoudhary avatar bcullman avatar borborborja avatar ch4r4f avatar chanzhaoyu avatar darumadocker avatar dasunnimantha avatar dotneet avatar ernestobarrera avatar huuphongnguyen avatar hyena459 avatar itbm avatar jdban avatar juntao avatar liby avatar matriq avatar mckaywrigley avatar nauxliu avatar oznav2 avatar riande avatar ryanhex53 avatar shemarlindie avatar sonnylazuardi avatar spctechdev avatar srsholmes avatar syedmuzamilm avatar thomasleveil avatar

Stargazers

 avatar

Watchers

 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.