<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Salmen Hichri</title>
    <description>The latest articles on Forem by Salmen Hichri (@salmenus).</description>
    <link>https://forem.com/salmenus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1198331%2F19158260-5bbf-4063-9a02-25f7943dadb9.png</url>
      <title>Forem: Salmen Hichri</title>
      <link>https://forem.com/salmenus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/salmenus"/>
    <language>en</language>
    <item>
      <title>The Future is Conversational ― Crafting Next-Gen User Experiences With AI</title>
      <dc:creator>Salmen Hichri</dc:creator>
      <pubDate>Thu, 11 Jan 2024 19:33:46 +0000</pubDate>
      <link>https://forem.com/salmenus/the-future-is-conversational-crafting-next-gen-user-experiences-with-ai-4ig2</link>
      <guid>https://forem.com/salmenus/the-future-is-conversational-crafting-next-gen-user-experiences-with-ai-4ig2</guid>
      <description>&lt;p&gt;Imagine a world where any software, app, or device intuitively understands your requests, actions, preferences ― without complex menus or rigid commands.&lt;/p&gt;

&lt;p&gt;Over the past few months, I’ve been quietly working on making this world a reality through a project called &lt;a href="https://nlux.ai"&gt;NLUX&lt;/a&gt;: A React JS / Javascript library I architected to enable developers to seamlessly build conversational interfaces.&lt;/p&gt;

&lt;p&gt;In this post, I will reveal &lt;strong&gt;insights&lt;/strong&gt; into the coming wave of transformative AI chatbots and voice assistants. I will share my perspective on what will soon drive &lt;strong&gt;the future of frontend software design&lt;/strong&gt;. I will also uncover &lt;strong&gt;how developers and product owners can readily embrace conversational interfaces&lt;/strong&gt; and start building the next generation of effortless, intuitive user experiences.&lt;/p&gt;




&lt;h2&gt;
  
  
  {a} The Future (Present) of Knowledge Work 🔮
&lt;/h2&gt;

&lt;p&gt;― And how AI creeped into my screen.&lt;/p&gt;

&lt;p&gt;Over the past 12 months, AI assistants have become an integral part of my work. At any given time, one of my dual screens is dedicated to conversing with &lt;a href="https://claude.ai"&gt;Claude&lt;/a&gt; or ChatGPT-4. &lt;strong&gt;I estimate that 50% of my screen time now involves AI collaboration&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These AI assistants help me in various ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;When tackling customer issues&lt;/strong&gt;, I'll have Zendesk software open on one display while using Claude AI chat window on the other to summarise the issue and to jog my memory about prior discussions and suggest potential solutions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;While communicating and producing documents&lt;/strong&gt;, I leverage AI to help structure content, create initial drafts that I then elaborate on, tweak, and refine before going back to AI for final polishing recommendations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;While coding&lt;/strong&gt;, my main code editor occupies one screen with its AI pair programmer activated. The second screen runs Claude to help me navigate complex codebases, recommend design patterns, or brainstorm algorithms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When learning something new&lt;/strong&gt;, I often start by querying my AI assistant to prime my knowledge. If I need more depth, I'll turn to Google or reference sites ― then go back to the AI to summarise key points and answer follow-up questions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Even in meetings&lt;/strong&gt;, I would sometimes have an AI chat window open to feed questions about topics that arise and get promptings for relevant talking points or ideas I can contribute.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;About half of my working time now involves AI collaboration of some kind&lt;/strong&gt; ― whether reading chatbot responses or asking questions via typed conversations, or other AI-enhanced productivity applications. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;While my heavy usage of AI assistants may be slightly ahead of the curve today, I believe it soon will become the norm among most knowledge workers as these tools continue advancing rapidly.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  {b} From Hyper-links to Hyper-ideas 💡
&lt;/h2&gt;

&lt;p&gt;― How the Web (and User Interfaces) are changing with AI.&lt;/p&gt;

&lt;p&gt;The early internet languished in obscurity for over a decade. While invented in 1983, it remained complex and boring until the World Wide Web arrived in the early 1990s. The Web popularised concepts we now take for granted ― like web pages, URLs, and hyperlinks.&lt;/p&gt;

&lt;p&gt;URLs enabled unique addresses to find information again later. Hyperlinks connected relevant content across pages. &lt;strong&gt;Together, they let users fluidly navigate the expanding online landscape by hopping from page to page&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The page-centric browsing defined the web experience for decades. Even modern single-page web apps largely mimic this model of consuming atomised information spread across disparate screens. &lt;strong&gt;But this paradigm is now poised for disruption by Conversational AI. Instead of clicking links between pages, users now engage in contextual conversations centred around ideas&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;With AI chatbots, we are moving from hyper-links to hyper-ideas. Users no longer transition across pages, but fluidly move from one relevant idea to another within a single paged conversation. The focus becomes pulling insights, recommendations, and answers from the assistant versus hunting for them across sites.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With conversational interfaces, there are no pages ― only an intelligent assistant ready to respond to users’ natural language intents and dialogue context. Behind the conversational facade hides the complexity of aggregating, connecting and reasoning over information. But for users, it feels like a familiar chat informed by the history and current needs.&lt;/p&gt;

&lt;p&gt;And this new paradigm requires a radical re-thinking of how user-interfaces should be designed and built.&lt;/p&gt;




&lt;h2&gt;
  
  
  {c} Patterns of Conversational UI 📣
&lt;/h2&gt;

&lt;p&gt;As we transition to conversational interfaces powered by AI, new UX design paradigms emerge across various embodiments. Here are some key patterns I see gaining traction:&lt;/p&gt;

&lt;h3&gt;
  
  
  (i) AI Chatbots ― The Baseline
&lt;/h3&gt;

&lt;p&gt;Text-based chatbots are becoming a key user interface layer. Every major application will soon feature a conversational assistant, allowing fluid toggling between clicking menus and chatting in natural language.&lt;/p&gt;

&lt;p&gt;These AI companions handle text queries, offer smart suggestions based on what the user types, and generate relevant content like text, images and more. Think of them a custom ChatGPT component embedded in each app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy7qg2zgblpl96k52y5sz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy7qg2zgblpl96k52y5sz.png" alt="The workflow of a user/AI conversational interaction&amp;lt;br&amp;gt;
" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A standalone ChatGPT pane for commentary, analysis and content creation.&lt;/li&gt;
&lt;li&gt;Customer support bots fielding product questions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  (ii) Co-Pilots ― The Smart Integration
&lt;/h3&gt;

&lt;p&gt;Beyond standalone chatbots lies an even tighter AI integration: Smart co-pilots that can integrate within existing interfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embedded co-pilots inherently understand the application context, user goals and work-in-progress&lt;/strong&gt;. They follow along in real-time and stand ready to offer proactive suggestions, answer questions, and execute actions precisely aligned to each moment's needs ― no lengthy explanations required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2u27c3540z8vfqjry0i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2u27c3540z8vfqjry0i.png" alt="The workflow of a user/AI co-pilot interaction&amp;lt;br&amp;gt;
" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine an inventory management application used daily by warehouse staff. An AI co-pilot could integrate directly into the interface to assist human users through natural conversations.&lt;/p&gt;

&lt;p&gt;For example, instead of clicking through menus and configuring filters to check low stock items, staff could simply type "Show me all stationary products with low inventory levels." The co-pilot would automatically translate this to the appropriate data query and display the results.&lt;/p&gt;

&lt;p&gt;Rather than navigating through reorder workflows, staff could tell the assistant: "Reorder these 7 products to regular levels." It would then execute the full workflow autonomously based on one plain language command.&lt;/p&gt;

&lt;p&gt;With these AI capabilities woven seamlessly into existing UIs, workers can focus purely on high-value business decisions rather than manual processes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;With AI co-pilots, the applications almost begin to understand and operate like human team members&lt;/strong&gt; ― smart assistants who can comprehend instructions and take action based on user needs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  (iii) Voice Assistants ― The Hand-Free Horizon
&lt;/h3&gt;

&lt;p&gt;While text chatbots provide a baseline, AI-infused voice assistants like OpenAI's &lt;a href="https://openai.com/blog/introducing-chatgpt-and-whisper-apis"&gt;Whisper API&lt;/a&gt; promise far more natural and ambient interactions. We stand at the cusp of perpetual ambient computing ― with always-available vocal assistants permeating our environments through smart speakers, headphones, car dashboards and more.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You may counter that you have tried solutions like Alexa or Siri before to disappointing results. But the latest wave of voice generation AI like Whisper, combined with generative powerhouses like ChatGPT, unlock game-changing capability. With its human-like vocalisations and strong contextual reasoning, such technology finally delivers on the promise of truly smart voice assistants.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Rather than stilted vocal commands, you can have free-flowing multi-turn dialogues about nuanced topics. No longer limited by narrow skills and rigid intents. And the system learns your preferences, vocabulary and requests patterns over time for personalisation.&lt;/p&gt;

&lt;p&gt;While I frequently use smart assistants via speech at home, in professional office settings I still find it awkward to openly speak to my devices with colleagues around me. A useful hybrid model would be to prompt requests via text and listen to voiced responses through a headset. This allows discreet immersive listening while keeping focused externally.&lt;/p&gt;

&lt;p&gt;The technology is nearly ready for seamless voice invocation in any context. But until social comfort catches up, hybrid interaction modes balance functionality with professional etiquette.&lt;/p&gt;

&lt;h3&gt;
  
  
  (iv) Augmented Reality Assistants ― The Merge
&lt;/h3&gt;

&lt;p&gt;While chatbots, voice assistants and co-pilots are only aware of context within a limited screen or device, augmented reality will massively expand contextual understanding to a user's full surrounding space.&lt;/p&gt;

&lt;p&gt;For office / knowledge workers, this expanded physical context awareness may not hugely aid AI assistance capabilities at first. But for many industrial, manual or spatially complex jobs, it stands to provide a game-changing boost.&lt;/p&gt;

&lt;p&gt;Imagine maintenance technicians able to summon holographic diagrams pinned to real machinery, with AI guides tailored to each repair situation, or factory workers getting in-situ optimisation recommendations based what they are looking at mid-assembly.&lt;/p&gt;

&lt;p&gt;Augmented reality long seemed a distant dream, but With &lt;a href="https://www.apple.com/apple-vision-pro/"&gt;Apple Vision Pro&lt;/a&gt; now shipping, blending atoms and bits is nearing reality. No longer a toggle between physical and digital ― but occupying hybrid spaces where information and AI agency manifest all around.&lt;/p&gt;




&lt;h2&gt;
  
  
  {d} Embedding Conversational AI Into Apps 🎬
&lt;/h2&gt;

&lt;p&gt;If you haven't already begun embedding AI, now is the ideal time. Here's my advice on taking the first steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit Workflows&lt;/strong&gt; - Analyse existing app and identify exactly where AI could simplify processes through faster access to information, smart recommendations, automated content generation, and workflow automation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluate AI Services&lt;/strong&gt; - Research conversational AI services like &lt;a href="https://openai.com/blog/openai-api"&gt;OpenAI&lt;/a&gt; (powerful models/APIs) or &lt;a href="https://cloud.google.com/vertex-ai"&gt;Google Vertex AI&lt;/a&gt; (access to Google’s AI portfolio). Both have accessible options. Other leaders include &lt;a href="https://docs.anthropic.com/claude/reference/getting-started-with-the-api"&gt;Anthropic&lt;/a&gt; and &lt;a href="https://aws.amazon.com/machine-learning/ai-services/"&gt;AWS&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jumpstart With Conversational UI&lt;/strong&gt; - Embed smart chatbot and co-pilot UIs into your web and mobile apps using tools like, &lt;a href="https://docs.nlux.ai/"&gt;NLUX&lt;/a&gt;. It blends chat and UI intuitively while integrating with leading language models. Check &lt;a href="http://nlux.ai/"&gt;nlux.ai&lt;/a&gt; for examples and documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key is to start small but think big. Identify some narrow yet high value assistance capabilities that conversational AI can deliver quickly - whether bolstering customer service, unlocking employee productivity, or streamlining user flows.&lt;/p&gt;

&lt;p&gt;Adding natural conversations is newly accessible for all levels of products if you leverage existing building blocks thoughtfully. This is just the dawn of the AI age - but you can get a head start today. Reach out if you want to discuss strategies for embedding intelligence!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;About The Author&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/hichri"&gt;Salmen Hichri&lt;/a&gt; is a seasoned software architect with over a decade of experience leading engineering teams at companies like Amazon and Goldman Sachs. He is also an open-source contributor and the founder of &lt;a href="https://docs.nlux.ai/examples/react-js-ai-chatbot"&gt;NLUX&lt;/a&gt;, a library for building conversational user interfaces that integrate with AI backends like ChatGPT.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>react</category>
      <category>ux</category>
      <category>webdev</category>
    </item>
    <item>
      <title>5 React / JS ⚛️ Libraries To Integrate ChatGPT Into Your Web App</title>
      <dc:creator>Salmen Hichri</dc:creator>
      <pubDate>Fri, 15 Dec 2023 16:09:54 +0000</pubDate>
      <link>https://forem.com/salmenus/5-react-js-libraries-to-integrate-chatgpt-into-your-web-app-24e7</link>
      <guid>https://forem.com/salmenus/5-react-js-libraries-to-integrate-chatgpt-into-your-web-app-24e7</guid>
      <description>&lt;p&gt;Adding an AI-powered conversational interface will soon become a must-have for any compelling web or mobile application user experience. Chatbots enable personalised and natural interactions, provide intelligent support, and improve user engagement. And React JS developers have more options than ever to embed incredibly smart capabilities into their apps.&lt;/p&gt;

&lt;p&gt;Here are 5 top open-source React / Javascript libraries for rapidly integrating feature-rich AI chatbots:&lt;/p&gt;

&lt;p&gt;⭐️ &lt;code&gt;Don't forget to show support and star them on GitHub&lt;/code&gt; ⭐️ 😊&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/nlkitai/nlux" rel="noopener noreferrer"&gt;NLUX&lt;/a&gt;&lt;/strong&gt; ⚛️ 🟨 – NLUX provides React components and adapters to build AI chatbots and seamlessly connect to LLMs such as ChatGPT, LLAMA2, and more. Whether creating a smart knowledge base, virtual support agents, or feature-rich AI assistants, it will handle the heavy lifting so developers can deliver next-gen conversational AI to customers faster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/hubtype/botonic" rel="noopener noreferrer"&gt;Botanic&lt;/a&gt;&lt;/strong&gt; ⚛️ - Botonic is a react framework to build a conversational app. It is more than creating simple text-based chatbots. It is built for developers and offers a full-stack serverless solution. It allows the developer to create chatbots and modern conversational apps that work on multiple platforms like web, mobile and messaging apps such as Messenger, Whatsapp, and Telegram.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://bottender.js.org/" rel="noopener noreferrer"&gt;Bottender&lt;/a&gt;&lt;/strong&gt; 🟨 - Bottender is a framework for building conversational user interfaces and is built on top of Messaging APIs. This framework has an easy setup, it has been optimized for real-world use cases, automatic batching requests, and dozens of other compelling features such as intuitive APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://fredrikoseberg.github.io/react-chatbot-kit-docs/" rel="noopener noreferrer"&gt;React Chatbot Kit&lt;/a&gt;&lt;/strong&gt; ⚛️ - React-chatbot-kit was designed as a way to get started building chatbots on the frontend in a quick and easy manner. The chatbot works by importing it and giving it a messageparser, a config and an actionprovider. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://platform.openai.com/docs/libraries" rel="noopener noreferrer"&gt;OpenAI JS SDK&lt;/a&gt;&lt;/strong&gt; 🟨 - OpenAI provides an official JavaScript SDK to access their industry-leading LLM ChatGPT. While intended for backend usage, developers can build a lightweight Node.js server and React front-end to deliver fast and integrated conversational experiences. For those wanting maximum control, the uncomplicated OpenAI JS API could be a good option.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Happy coding! 🧑‍💻🙂&lt;/p&gt;

&lt;p&gt;⚛️ → &lt;em&gt;React JS Library&lt;/em&gt;&lt;br&gt;
🟨 → &lt;em&gt;Vanilla Javascript Library&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2t89sq5mxlul06jywvl.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2t89sq5mxlul06jywvl.gif" alt="Programmer"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>ai</category>
    </item>
    <item>
      <title>Develop AI Apps with React and Javascript</title>
      <dc:creator>Salmen Hichri</dc:creator>
      <pubDate>Tue, 21 Nov 2023 01:04:38 +0000</pubDate>
      <link>https://forem.com/salmenus/develop-ai-apps-with-react-and-javascript-516b</link>
      <guid>https://forem.com/salmenus/develop-ai-apps-with-react-and-javascript-516b</guid>
      <description>&lt;p&gt;Conversational AI is revolutionizing how users interact with technology. Chatbots like ChatGPT and voice assistants like Siri are becoming ubiquitous, providing more natural and intuitive ways for people to get information or accomplish tasks.&lt;/p&gt;

&lt;p&gt;As conversational AI continues improving, developers have an immense opportunity to create next-generation web applications with seamless voice and text-based conversational experiences. Integrating a conversational interface enables apps to understand what users say, ask clarifying questions, and have personalized dialogs to help users accomplish goals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React JS ⚛️ Is An Ideal Web Framework For Building Such AI-Powered Apps.&lt;/strong&gt; With its component architecture and rich ecosystem of tools, React makes it easy to create dynamic and interactive user interfaces. And by leveraging natural language understanding systems like ChatGPT, those interfaces can now have intelligent conversations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Conversational AI + React ?
&lt;/h2&gt;

&lt;p&gt;There are so many reasons that I can think about, but here are just a few:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced User Experience&lt;/strong&gt; 💎 - More intuitive and human-like interactions using natural language conversations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Personalization&lt;/strong&gt; 👩‍🎤 - Chatbots can be adapted to web app use-case and can remember user context and have customized dialogs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time Savings&lt;/strong&gt; - 🏎️ Automate common questions and requests to save people time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt; - 🚀 Bots don't get overwhelmed by increasing users. Scale conversational capabilities easily.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rapid Innovation&lt;/strong&gt; - 💡 Quickly build prototypes and MVPs with conversational UI libraries like NLUX. Test ideas faster.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  NLUX - Conversational UI Library for React JS
&lt;/h2&gt;

&lt;p&gt;To make AI integration even simpler for React developers, I built &lt;a href="https://nlux.ai" rel="noopener noreferrer"&gt;NLUX&lt;/a&gt;, &lt;strong&gt;an open source Javascript / React JS library for rapidly building conversational interfaces&lt;/strong&gt;. NLUX provides React components like chat widgets, text inputs, &lt;em&gt;and soon microphones and avatars&lt;/em&gt;, so you can focus on creating great experiences versus building UI elements from scratch.&lt;/p&gt;

&lt;p&gt;The library also handles all the complexity of communications with backend AI systems. It has adapters for ChatGPT and other language models, abstracting away the APIs and data formatting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Capabilities:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drop-in React chat widget with theming and customization options&lt;/li&gt;
&lt;li&gt;Send system messages to language models to provide context, guidance, and instructions&lt;/li&gt;
&lt;li&gt;Streaming responses for real-time conversations&lt;/li&gt;
&lt;li&gt;Easy integration with ChatGPT and other language models&lt;/li&gt;
&lt;li&gt;Framework agnostic JavaScript version available too&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With NLUX, developers can have rich conversational UIs up and running incredibly fast. And as more third-party AI backends emerge, NLUX makes it simple to experiment and leverage different language models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example ⭐️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A Travel Assistant AI Bot In Few Lines
&lt;/h3&gt;

&lt;p&gt;To demonstrate how simple it is to build AI apps with &lt;a href="https://nlux.ai" rel="noopener noreferrer"&gt;NLUX&lt;/a&gt;, let's create a basic travel assistant bot.&lt;/p&gt;

&lt;p&gt;This bot will let users ask about travel recommendations, understand natural language queries, and ask follow-up questions to provide more details.&lt;/p&gt;

&lt;p&gt;We start by importing NLUX dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AiChat&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nlux/react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useAdapter&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nlux/openai-react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nlux/themes/kensington.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We create and configure a ChatGPT adapter. We instruct it to act as a travel assistant, we do that by providing instructions to ChatGPT through the &lt;code&gt;systemMessage&lt;/code&gt; attribute, as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;adapter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useAdapter&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YOUR_OPEN_AI_API_KEY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;initialSystemMessage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I want you to act as a travel assistant. &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I want you to give advice to the user and help them &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;plan their upcoming trip. I want you to be creative &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;and funny, and suggest some original ideas.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The user is 22 years old and they are full of &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;energy and looking for something exciting to do.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, we pass than adapter to the &lt;code&gt;&amp;lt;AiChat /&amp;gt;&lt;/code&gt; UI component, that will display the ChatBot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AiChat&lt;/span&gt; &lt;span class="na"&gt;adapter&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;adapter&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the result is a funny chatbot that can help you plan any future trip ✈️👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fnlux.ai%2Fimages%2Fdemos%2Fchat-convo-travel-assistant-paris.gif%3Fdemo" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fnlux.ai%2Fimages%2Fdemos%2Fchat-convo-travel-assistant-paris.gif%3Fdemo" alt="An AI Chatbot built with NLUX assistant user in planning a trip to Paris"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Possibilities are Endless!&lt;/p&gt;

&lt;p&gt;This example just scratches the surface of what’s possible when combining React with modern NLU systems. You could build a personal tutor bot, a vocabulary teaching app, a conversational shopping assistant, and way more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run It Yourself ⚙️
&lt;/h2&gt;

&lt;p&gt;You can find below a similar Codesandbox example. It uses a custom adapter that connect to NLUX's demo API instead of the ChatGPT adapter suggested above.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/2q3trg?module=%2Fapp.tsx"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More About Nlux 💬
&lt;/h2&gt;

&lt;p&gt;NLUX is an open-source project created to make embedding the power of large language model easy and attainable for all Javascript and React JS developers.&lt;/p&gt;

&lt;p&gt;To learn more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NPM&lt;/strong&gt; Packages for &lt;a href="https://www.npmjs.com/package/@nlux/react" rel="noopener noreferrer"&gt;React JS here&lt;/a&gt; and for &lt;a href="https://www.npmjs.com/package/@nlux/core" rel="noopener noreferrer"&gt;Vanilla JS here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt; Repository: &lt;a href="https://github.com/nluxai/nlux" rel="noopener noreferrer"&gt;github.com/nluxai/nlux&lt;/a&gt; - You can ask questions or get help in the GitHub Discussions section.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website&lt;/strong&gt; for documentation and updates: &lt;a href="https://nlux.ai" rel="noopener noreferrer"&gt;nlux.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you like the idea, please star ⭐️ the repo on GitHub to show your support! 🙏️ 🙂 🧡&lt;/p&gt;

&lt;p&gt;Thank you so much!&lt;br&gt;
Salmen&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>ai</category>
    </item>
    <item>
      <title>Chatbot Dreams &amp; Markdown Streams: Creating React JS ChatGPT Bots in Minutes</title>
      <dc:creator>Salmen Hichri</dc:creator>
      <pubDate>Mon, 13 Nov 2023 08:35:42 +0000</pubDate>
      <link>https://forem.com/salmenus/chatbot-dreams-markdown-streams-creating-react-js-chatgpt-bots-in-minutes-1nig</link>
      <guid>https://forem.com/salmenus/chatbot-dreams-markdown-streams-creating-react-js-chatgpt-bots-in-minutes-1nig</guid>
      <description>&lt;p&gt;Hey there, fellow travelers on the digital superhighway! If you’ve got a chatbot that feels about as current as a flip phone at a tech conference, it’s time for an upgrade. &lt;a href="https://nlux.ai" rel="noopener noreferrer"&gt;NLUX&lt;/a&gt; is here to rev your chatbot’s engine with text streaming that’s as smooth as your favorite jazz solo — and it comes in markdown!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Text Streaming is the Espresso Shot Your Chatbots Need
&lt;/h2&gt;

&lt;p&gt;Imagine unleashing a world where each message from your chatbot doesn’t just pop up — it performs. That’s text streaming, folks. It’s the difference between getting a telegram and having a conversation. Streaming text keeps users glued to the screen, watching your AI’s thoughts unfold in real-time. It’s fresh, it’s captivating, and it’ll make your chatbot the belle of the digital ball.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Marvel of Markdown
&lt;/h2&gt;

&lt;p&gt;Regular text has its charm, but markdown text in a streaming chatbot is like Shakespeare in a leather jacket — classic with a kick. It lets you strut your content with style; bolds, italics, lists, you name it. Because when your chatbot says:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Our plans? Basic — five bucks. Premium — double that. VIP? Let’s chat.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It doesn’t hold a candle to the suave sophistication of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic Plan: $5/month&lt;/li&gt;
&lt;li&gt;Premium Plan: $10/month&lt;/li&gt;
&lt;li&gt;Enterprise Plan: Let’s talk 😉&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which one’s clearer? Exactly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Not Your Average Bot Builder
&lt;/h2&gt;

&lt;p&gt;So, what’s &lt;a href="https://nlux.ai/" rel="noopener noreferrer"&gt;NLUX&lt;/a&gt;? It’s a sparkling React JS and JavaScript library that’s about to become your chatbot’s BFF. NLUX turbocharges the developer experience with a Javascript library that designed to whip up conversational interfaces with personality and pizzazz. We’re the secret sauce to your chatbot gourmet, and we keep things simple, streamlined, and spiffy.&lt;/p&gt;

&lt;p&gt;Now, let’s paint a picture! Here is NLUX markdown streaming in action 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flclizmhu23i3wn5bktfv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flclizmhu23i3wn5bktfv.gif" alt="NLUX Chatbot with Markdown Streaming"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  NLUX — The Game Changer JS Lib
&lt;/h2&gt;

&lt;p&gt;So, why is NLUX’s approach the bee’s knees?&lt;br&gt;
We’re glad you asked! Here’s the scoop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;As You Type Streaming:&lt;/strong&gt; We treat every character with the respect it deserves, delivering it hot and fresh to the user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vivid Visuals with Markdown:&lt;/strong&gt; Pretty lists, bold statements, and italics so fine they’d make a typewriter jealous.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smooth and Speedy:&lt;/strong&gt; Like a Tesla in ludicrous mode, NLUX’s performance is both high-speed and enviably smooth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;React And Vanilla JS Today, More Tomorrow:&lt;/strong&gt; We got you covered with React components and hooks, and Vanilla JS, but we’re just getting warmed up. The future is looking bright and sassy!&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Quick-Start Code: Your NLUX Chatbot in a Flash
&lt;/h2&gt;

&lt;p&gt;Under the hood of NLUX’s charm and wit lies an impressive engine of efficiency — one that lets you conjure up an AI chatbot faster than you can say “Abracadabra!” But don’t just take our word for it. Let the code speak for itself. Here’s a sneak peek at just how effortlessly you can set the stage for your very own ChatGPT bot with NLUX:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;NluxConvo&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nlux/nlux-react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;useAdapter&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nlux/openai-react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MyChatComp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chatGptAdapter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useAdapter&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YOUR_OPEN_AI_API_KEY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// 👇 Instruct ChatGPT how to behave (optional)&lt;/span&gt;
        &lt;span class="na"&gt;initialSystemMessage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Act as a Nobel Prize in Physics winner who is &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;helping a PHD student in their research&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NluxConvo&lt;/span&gt;
            &lt;span class="nx"&gt;adapter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;chatGptAdapter&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nx"&gt;promptBoxOptions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
                &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ask me anything about nuclear physics!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
            &lt;span class="p"&gt;}}&lt;/span&gt;
        &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Wait ... is that it? Yes, you bewitching developers, getting started with NLUX really is that simple. Copy this incantation into your React app, insert your API key, and you’re mere moments away from breathing life into your very own chatty creation.&lt;/p&gt;

&lt;p&gt;Of course, this is just the tip of the wizard’s hat. NLUX gives you the power to customize, optimize, and accessorize your chatbot to your heart’s content. But as for the basics — well, you could probably teach them to your cat (although we don’t recommend it, as cats are notoriously indifferent students).&lt;/p&gt;

&lt;p&gt;Ready to take that deep dive into the arcane arts of conversation and code?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Check the &lt;a href="https://docs.nlux.ai/category/getting-started" rel="noopener noreferrer"&gt;Getting Started Guide&lt;/a&gt; on NLUX’s docs website.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Open Source Awesomeness
&lt;/h2&gt;

&lt;p&gt;Oh, and did we mention the best part? No? Well, grab your party hats, because &lt;strong&gt;NLUX is as free as an eagle&lt;/strong&gt; soaring over a mountain range at sunset. That’s right, our top-notch, high-octane, markdown-streaming tech goodness is open-source! Your wallet can breathe a sigh of relief, and your developer heart can do a little salsa dance of joy.&lt;/p&gt;

&lt;p&gt;Think of NLUX as your digital toolkit for crafting chatbot experiences that are crafted with the same care a master watchmaker puts into their timepieces — and it won’t cost you a dime. We believe in the power of community and sharing the wealth that is efficient, dynamic communication.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ready to dive into the code? Check out the &lt;a href="https://github.com/nluxai/nlux" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt; and sprinkle your projects with some NLUX fairy dust.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And for the smooth operators who like their packages delivered with NPM finesse, slide on over to our package page and get your download on&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@nlux/nlux-react" rel="noopener noreferrer"&gt;NLUX On NPM&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Step into the NLUX dimension, where chatbots are zippy, the UI’s snappy, and your content’s got more style than a runway model during fashion week. The future of conversational interfaces is here, and it’s looking markdown marvelous.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9el1zxs0pz32qr5xwtiy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9el1zxs0pz32qr5xwtiy.png" alt="An AI Chatbot Built Using NLUX"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take NLUX for a spin and share your thoughts—we're all ears and code! As an open source project still in its dawn, every bit of feedback is like a burst of sunlight.&lt;/p&gt;

&lt;p&gt;Join the journey and help shape its tomorrow.&lt;br&gt;
Best,&lt;br&gt;
Salmen&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>react</category>
      <category>ai</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How To Build AI Chatbots Using React JS in Minutes</title>
      <dc:creator>Salmen Hichri</dc:creator>
      <pubDate>Wed, 08 Nov 2023 14:00:33 +0000</pubDate>
      <link>https://forem.com/salmenus/how-to-build-ai-chatbots-using-react-js-in-minutes-1j67</link>
      <guid>https://forem.com/salmenus/how-to-build-ai-chatbots-using-react-js-in-minutes-1j67</guid>
      <description>&lt;p&gt;Conversational AI is taking off, and chatbots powered by large language models (LLMs) like ChatGPT are rapidly becoming a must-have for many apps and websites. As a React developer, you want a simple way to build a great chat interface backed by these incredible LLMs. &lt;strong&gt;That’s where &lt;a href="https://nlux.ai"&gt;NLUX&lt;/a&gt;, — the open-source Javascript / React JS library, comes in&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Straight To The Point 👇
&lt;/h2&gt;

&lt;p&gt;Here is all what you need to build a custom AI chatbot using NLUX:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @nlux/react @nlux/openai-react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;AiChat&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nlux/react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;useAdapter&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nlux/openai-react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MyAiChatComp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chatGptAdapter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useAdapter&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;YOUR_OPEN_AI_API_KEY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;initialSystemMessage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I want you to act Elon Musk, with a twist of humor, teaching &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a web developer about how to make the most out of &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
            &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;generative AI. Give answers of around 1 paragraph.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AiChat&lt;/span&gt;
            &lt;span class="na"&gt;adapter&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;chatGptAdapter&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;promptBoxOptions&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hi, Elon here! How can I help?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we’re instructing ChatGPT to “act as” Elon Musk, and advise a web developer about how to make the most out of generative AI. All the interactions with the bot will be influenced by that instruction.&lt;/p&gt;

&lt;p&gt;You can enter any “act as” instruction! Your imagination is the limit!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Result 💬 🤖
&lt;/h2&gt;

&lt;p&gt;And now you have added to your web page an AI chat component, with a prompt box, and a What’s-App-like UI, connected to OpenAI’s ChatGPT API, and actually behaving like Elon Musk!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fblcrxr6f99r7u5jthxap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fblcrxr6f99r7u5jthxap.png" alt="How to build Conversational AI with NLUX" width="511" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And this how the conversation happens:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/23xh6f?module=%2Fapp.tsx"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  So What Is NLUX ? 👨‍💻
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://nlux.ai"&gt;NLUX&lt;/a&gt; (for Natural Language User eXperience) is a new open-source Javascript / React JS library that makes it super simple to integrate powerful large language models (LLMs) like ChatGPT into your web app or website.&lt;/p&gt;

&lt;p&gt;As you can see in the example above, with just a few lines of code, you can add conversational AI capabilities and interact with your favourite LLM.&lt;/p&gt;

&lt;p&gt;Over the past few weeks, I have dedicated significant time and effort into this project. Moving forward, I am excited to commit even more time and energy toward building a free, open-source, and features-rich JS library to make it super simple for web developers to build AI-powered apps.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your contributions are welcome. &lt;strong&gt;&lt;em&gt;If you have an idea for a new feature or want to fix a bug, feel free to open an issue or submit a pull request.&lt;/em&gt;&lt;/strong&gt; I’ll be very excited to see what you can build with NLUX!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Learn More
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;NPM Packages for &lt;a href="https://www.npmjs.com/package/@nlux/react"&gt;React JS here&lt;/a&gt; and for &lt;a href="https://www.npmjs.com/package/@nlux/core"&gt;Vanilla JS here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;GitHub Repository: &lt;a href="https://github.com/nluxai/nlux"&gt;github.com/nluxai/nlux&lt;/a&gt; - You can ask questions or get help in the GitHub Discussions section.&lt;/li&gt;
&lt;li&gt;Website for documentation and updates: &lt;a href="https://nlux.ai"&gt;nlux.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you like the idea, &lt;strong&gt;&lt;a href="https://github.com/nluxai/nlux"&gt;please star ⭐️ the repo on GitHub&lt;/a&gt;&lt;/strong&gt; to show your support! 🙏️ 🙂 🧡&lt;/p&gt;

&lt;p&gt;Thank you so much!&lt;br&gt;
Salmen&lt;/p&gt;

</description>
      <category>react</category>
      <category>openai</category>
      <category>javascript</category>
      <category>news</category>
    </item>
  </channel>
</rss>
