The π£πΌππ²πΏπ³ππΉ Conversational AI JavaScript Library π¬ βΒ UI for any LLM, supporting LangChain / HuggingFace / Vercel AI, and more 𧑠React, Next.js, and plain JavaScript βοΈ
OTHER License
NLUX
is React and JavaScript open-source library for building conversational AI interfaces. It makes it super simple
to build web applications powered by Large Language Models (LLMs). With just a few lines of code, you can add
conversational AI capabilities and interact with your favorite AI models.
NLUX
πUse nlux-cli
to quickly spin up a new Next.js
, React
, or Vanilla TypeScript
project with NLUX integrated.
Get started with NLUX
and your favorite web framework under a minute:
# Next.js πΌ with NLUX
npx nlux-cli create next my-next-app
# React βοΈ , Vite, with NLUX
npx nlux-cli create react my-react-app
# Or, vanilla TypeScript π¨ , Vite, with NLUX
npx nlux-cli create vanilla my-vanilla-app
The docs website is available at: docs.nlkit.com/nlux
Several Get Started Guides are available, including for: Next.js and Vercel AI β LangChain LangServe β React with Node.js Backend
<AiChat />
for UI and useChatAdapter
hook for easy integration.ChatGPT
β LangChain
π¦ LangServe
APIs β Hugging Face
π€ Inference.This GitHub repository contains the source code for the NLUX
library.
It is a monorepo that contains code for following NPM packages:
βοΈ React JS Packages:
@nlux/react
β React JS components for NLUX
.@nlux/langchain-react
β React hooks and adapter for APIs@nlux/openai-react
β React hooks for the OpenAI API, for testing@nlux/hf-react
β React hooks and pre-processors for the Hugging Face@nlux/nlbridge-react
β Integration with nlbridge
, theπ¨ Vanilla JS Packages:
@nlux/core
β The core Vanilla JS library to use with any web framework.@nlux/langchain
β Adapter for APIs created using LangChain's@nlux/openai
β Adapter for the OpenAI API, for testing and@nlux/hf
β Adapter and pre-processors for the Hugging Face Inference API.@nlux/nlbridge
β Integration with nlbridge
, the Express.js LLMπ Themes & Extensions:
@nlux/themes
β The default Luna
theme and CSS styles.@nlux/markdown
β Markdown stream parser to render@nlux/highlighter
β Syntax highlighter based onPlease visit each package's NPM page for information on how to use it.
The following design principles guide the development of NLUX
:
Intuitive β Interactions enabled by NLUX
should be intuitive.
Usage should unfold naturally without obstacles or friction. No teaching or thinking
should be required to use UI built with NLUX
.
Performant β NLUX
should be as fast as possible. Fast to load, fast to render
and update, fast to respond to user input. To achieve that, we should avoid unnecessary
work, optimize for performance, minimize bundle size, and not depend on external libraries.
Accessible β UI built with NLUX
should be accessible to everyone. It should be usable
by people with disabilities, on various devices, in various environments, and using various
input methods (keyboard, touch, voice).
DX β NLUX
recognizes developers as first-class citizens. The library should enable an
optimal DX (developer experience). It should be effortless to use, easy to understand, and
simple to extend. Stellar documentation should be provided. The feature roadmap should evolve
aligning to developer needs voiced.
Our mission is to enable developers to build outstanding LLM front-ends and applications, cross platforms, with a focus on performance and usability.
NLUX
, please star the repo to show your support.NLUX
is licensed under Mozilla Public License Version 2.0 with restriction to use as
part of a training dataset to develop or improve AI models, or as an input for code
translation tools.
Paragraphs (3.6) and (3.7) were added to the original MPL 2.0 license. The full license text can be found in the LICENSE file.
In a nutshell:
NLUX
in your personal projects.NLUX
in your commercial projects.NLUX
and publish your changes under the same license.NLUX
's source code as dataset to train AI models, nor with code translation tools.Wondering what it means to use software licensed under MPL 2.0? Learn more on MPL 2.0 FAQ. Please read the full license text in the LICENSE file for details.
This open-source project fits under the umbrella of NLKit, a suite of tools and libraries for
building conversational AI applications. NLUX
is the first project in the NLKit suite, with more to come.
The project is being led by Salmen Hichri, a senior software engineer with over a decade of experience building user interfaces and developer tools at companies like Amazon and Goldman Sachs, and contributions to open-source projects.