Code Monkey home page Code Monkey logo

langchain's Introduction

LLM React App Javascript Template 🪐

License Cosmos Cosmos

What is this template?

This template is an example project for a simple Large Language Model (LLM) application built on top of React and Node. This template was built on top of the React template app from nano-react-app and updated with a Node server that uses HuggingFace.js and LangChain.js to connect to supported large language models. Use this template to easily build and run an LLM app, like the screenshot below:

screenshot of LLM react app

Getting Started

To get started, follow the below steps:

  1. Create an .env file by copying the SAMPLE_env file and add the model store provider you'll be using (e.g. HUGGING_FACE or OPEN_AI) and the API keys for the models you are going to use

  2. Install packages

  3. Run the backend server that will start with a default port of 3100

        yarn start-server
  4. Run the frontend server that will start with a default port of 5173.

       yarn start

    Note: You can use the -p flag to specify a port for the frontend server. To do this, you can either run yarn start with an additional flag, like so:

        yarn start -- --port 3000

    Or, edit the start script directly:

    vite --port 3000

Additional scripts are provided to prepare the app for production

  • yarn build — This will output a production build of the frontend app in the dist directory.
  • yarn preview — This will run the production build of the frontend app locally with a default port of 5173 (note: this will not work if you haven't generated the production build yet).

Tutorials

👽 Looking for more content? Check out our tutorials on running LLM apps 📚


How to Contribute

Feel free to try out the template and open any issues if there's something you'd like to see added or fixed, or open a pull request to contribute.

Shout out to the ⭐star gazers⭐

Stargazers repo roster for @golivecosmos/llm-react-node-app-template

Thanks for the forks🍴

Forkers repo roster for @golivecosmos/llm-react-node-app-template

langchain's People

Contributors

minhtet-o 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.