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.
26 lines (22 loc) • 809 B
text/mdx
In Javascript, you can define the bot persona by calling `withPersonaOptions` when creating the `AiChat` component.
The `withPersonaOptions` function takes an object with two properties: `bot` and `user`. The `bot` property is
what you use to define the bot persona, as shown in the example below.
```javascript
const aiChat = createAiChat()
.withAdapter(adapter)
.withPersonaOptions({
bot: {
name: 'HarryBotter',
picture: 'https://nlux.ai/images/demos/persona-harry-botter.jpg',
tagline: 'Mischievously Making Magic With Mirthful AI!'
}
});
```
The object passed to the `bot` property should match the following interface:
```typescript
interface BotPersona {
name: string;
picture: string | HTMLElement;
tagline?: string;
}
```