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. nlux
nlux
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!
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.
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:
“Our plans? Basic — five bucks. Premium — double that. VIP? Let’s chat.”
It doesn’t hold a candle to the suave sophistication of:
Which one’s clearer? Exactly.
So, what’s nlux
nlux
? It’s a sparkling React JS and JavaScript library that’s about to become your chatbot’s BFF. nlux
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.
Now, let’s paint a picture! Here is nlux
nlux
markdown streaming in action 👇
(A demo of a markdown stream from ChatGPT being rendered in an AI chatbot using nlux
nlux
)
nlux
nlux
— The Game Changer JS LibSo, why is nlux
nlux
’s approach the bee’s knees?
We’re glad you asked! Here’s the scoop:
nlux
nlux
’s performance is both high-speed and enviably smooth.nlux
nlux
flexes to fit your chatbot’s vibe.nlux
nlux
Chatbot in a FlashUnder the hood of nlux
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
nlux
:
import {AiChat} from '@nlux/react';
import {useAdapter} from '@nlux/openai-react';
const App = () => {
const chatGptAdapter = useAdapter('openai/gpt', {
apiKey: 'YOUR_OPEN_AI_API_KEY',
// 👇 Instruct ChatGPT how to behave (optional)
systemMessage:
'Act as a Nobel Prize in Physics winner who is ' +
'helping a PHD student in their research'
});
return (
<AiChat
adapter={chatGptAdapter}
promptBoxOptions={{
placeholder: 'Ask me anything about nuclear physics!'
}}
/>
);
}
import {AiChat} from '@nlux/react';
import {useAdapter} from '@nlux/openai-react';
const App = () => {
const chatGptAdapter = useAdapter('openai/gpt', {
apiKey: 'YOUR_OPEN_AI_API_KEY',
// 👇 Instruct ChatGPT how to behave (optional)
systemMessage:
'Act as a Nobel Prize in Physics winner who is ' +
'helping a PHD student in their research'
});
return (
<AiChat
adapter={chatGptAdapter}
promptBoxOptions={{
placeholder: 'Ask me anything about nuclear physics!'
}}
/>
);
}
Wait… is that it? Yes, you bewitching developers, getting started with nlux
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.
Of course, this is just the tip of the wizard’s hat. nlux
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).
Ready to take that deep dive into the arcane arts of conversation and code?
Check the Getting Started Guide on
nlux
nlux
’s docs website.
Oh, and did we mention the best part? No? Well, grab your party hats, because nlux
nlux
is as free as an eagle 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.
Think of nlux
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.
Ready to dive into the code? Check out the GitHub repo and sprinkle your projects with some
nlux
nlux
fairy dust.
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
Step into the nlux
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.
--
Take nlux
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.
Join the journey and help shape its tomorrow.
Best,
Salmen
nlux is built and maintained by Salmen Hichri - Copyright © 2024 All rights reserved.
The source code of nlux is licensed under Mozilla Public License Version 2.0