UNPKG

remix-nlux

Version:

Remix IDE NLUX integration. Remix IDE is the leading IDE for building and deploying smart contracts on Ethereum. NLUX is a JavaScript and React library for building conversational AI experiences.

18 lines (14 loc) 418 B
import {ParticipantRole} from '@nlux/core'; import {PersonaOptions} from '../../../exports/personaOptions'; export const avatarFromMessageAndPersona = ( role: ParticipantRole, personaOptions?: PersonaOptions, ) => { if (role === 'assistant') { return personaOptions?.assistant?.avatar; } if (role === 'user') { return personaOptions?.user?.avatar; } return undefined; };