Skip to main content
Version: v2.x

Conversation Starters

By default, the assistant persona avatar, name, and tagline are displayed in the chat window when the conversation is empty. When no assistant persona is provided, the NLUX logo is displayed instead.

You can disable this behavior by setting the conversationOptions.showWelcomeMessage prop to false.

import {useMemo} from 'react';
import {AiChat} from '@nlux/react';
import '@nlux/themes';
import {streamAdapter} from './adapter';
import {userPersona, assistantPersona} from './setup';

export default () => {
  const adapter = useMemo(() => streamAdapter, []);

  return (
    <div style={{ display: 'flex', flexDirection: 'column', height: '90vh' }}>
            conversationStarters: [
                {prompt: 'Write a poem using markdown and emojis'},
                {prompt: 'What is your name?'},
                {prompt: 'What is your favorite color?'}
          assistant: assistantPersona,
          user: userPersona
        displayOptions={{colorScheme: 'dark'}}

Learn More About Chat Personas