Coder Social home page Coder Social logo

chat_app's Introduction

LLM-Powered Chat Application

This repository contains all of the starter code needed to run an LLM-powered chat app on your local machine:

  1. Django backend
  2. React TypeScript frontend
  3. LangChain Agents and LLMs

Getting Started ๐Ÿš€

To run the chat app, you need to:

  1. Clone this GitHub repo
  2. Run the backend server
  3. Run the frontend app

1. Clone this GitHub repo ๐Ÿ“

To clone this GitHub repo, open up your Terminal (MacOS) or Bash terminal (Windows) and navigate to wherever you want to save this repo on your local machine. Then, run:

git clone https://github.com/virattt/chat_app.git

Make sure that you have git installed (instructions).

2. Run the backend server ๐Ÿ–ฅ๏ธ

Once you have this chat_app project cloned locally, navigate to the backend directory:

cd ~/path_to/chat_app/backend

Create and activate a virtual environment:

python3 -m venv myenv

For MacOS/Linux:

source myenv/bin/activate

For Windows:

myenv\Scripts\activate

Install the necessary libraries:

pip install -r requirements.txt

Make sure that you have Redis installed. You can find instructions here. Once installed, run redis:

redis-server

Run the backend server:

daphne project.asgi:application

If your backend server is running correctly, you should see something like this:

"WSCONNECTING /ws/chat/" - -
"WSCONNECT /ws/chat/" - -

Important: In order to run the LLM, set your Open AI API key here.

3. Run the frontend app ๐Ÿ’ป

In a new Terminal window (or tab), navigate to the frontend directory:

cd ~/path_to/chat_app/frontend

Make sure that you have Node and npm installed (MacOS instructions and Windows instructions)

Install the necessary packages:

npm install

Run the frontend app:

npm start

If successful, your browser should open and navigate to http://localhost:3000/. The chat app should load automatically.

The Chat App UX ๐Ÿค–

As of May 17, 2023 Screen Shot 2023-05-17 at 4 52 27 PM

Troubleshooting โš ๏ธ

If you encounter any issues, send me a message on Twitter!

chat_app's People

Contributors

virattt avatar waseemhnyc 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.