The JavaScript React library lets developers build AI chatbots

Mondo Technology Updated on 2024-02-01

NLUX is a front-end library that comes with adapters for ChatGPT and Hugging Face large language models, as well as support for personalized customization of chatbots.

Translated from J**Ascript React Library Lets Developers Build AI Chatbots by Loraine Lawson. NLUX is a new open-source j**ascript React library that allows developers to build their own chatbot user interfaces and customize the bot's personality with natural language prompts.

NLUX works with any large language model (LLM) backend service, and it has built-in connectivity adapters with OpenAI's ChatGPT and Hugging Face's large language models. It is also possible to build custom flow adapters or promise adapters to connect to other LLMs or APIs. "Let's say there's a big company that doesn't use publicly available OpenAI large language models, but they want to use custom models hosted on their own servers," says Salmen Hichri, the creator of NLUX, "and they can actually build and customize their own models, but they can still use NLUX to connect those models." They need to build a custom adapter for their models and APIs. Hichri said there are older chatbot libraries, but as far as he knows, NLUX is the first AI-specific library.

Currently, NLUX has two "flavors":

nlux react js, including react components and hooks; And.

nlux js, which is a pure j**ascript library that can be used with any web framework.

Hichri told The New Stack that part of the reason for choosing React was that it offered an intuitive way to build applications. And, a large number of developers are using React, he added. This is supported by the recently released 2023 J**Ascript Rising Stars survey, which found that React retains the most popular position for the J**Ascript framework for its third year. "There are already millions of developers using React and Jascript who are at the forefront of building digital experiences," Hichri said, "and they're writing web apps, creating **, mobile apps, and we want to help them build intuitive conversational experiences." ”

At the moment, developers do need to know some React to use the library, although if developers only know J**Ascript, they can still use the J**Ascript version of the library with other frameworks. Hichri plans to expand NLUX to support Angular, React Native, and possibly Preact. Developers can personalize their chatbot with natural language prompts and a few lines** to add a bit of personality to the conversation. They can also instruct the robot to be serious, humorous, humble, or confident. "For adapters, we already have adapters for OpenAI and Hugging Face, and we allow customization through so-called system messages," he explained. "So when a developer uses NLUX, the system message (which is not visible to the user) is like the developer telling the chatbot to behave in a certain way. ”

NLUX is also currently building an adapter for Langchain, as well as support for server-side rendering. Voice chat is also on the library's roadmap. Right now, the focus on generative AI application development is building something that is essentially an AI-powered chatbot. But Hichri and others in the field say the focus will soon shift to AI peers who will be able to perform actions within the app after receiving natural language commands.

It's not just a conversation, it's an intelligent system that can perform actions on behalf of the user, which is embedded in the application or software," he said. "Users still need to define what kind of actions can be performed on their software, but the triggers won't be click-and-find menus, the triggers will be natural language expressions. ”

This companion mode is on NLUX's roadmap and should be available soon, he added.

Another trend influencing the application of AI will be the ability to be spatially aware and combine it with augmented reality, Hichir**. Specifically, he pointed to Apple's work on Vision Pro, but noted that OpenAI is also starting to offer some features that would allow them to be an augmented reality assistant. "It might not be a big deal for someone who works in an office, but for certain industries or types of work in construction, or some other jobs where spatial awareness is very important, accessing an intelligent AI system through an augmented reality assistant, it's revolutionary," he said.

Related Pages