nlkitai / nlux

The π—£π—Όπ˜„π—²π—Ώπ—³π˜‚π—Ή Conversational AI JavaScript Library πŸ’¬ β€”Β UI for any LLM, supporting LangChain / HuggingFace / Vercel AI, and more 🧑 React, Next.js, and plain JavaScript ⭐️
https://docs.nlkit.com/nlux
Other
937 stars 48 forks source link

Error in the documentation about javascript apis with bot persona #52

Closed FriendlyUser closed 1 month ago

FriendlyUser commented 2 months ago

Chat personas error

https://nlux.dev/learn/chat-personas

How To Define The Bot Persona

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.

const aiChat = createAiChat()
    .withAdapter(adapter)
    .withPersonaOptions({
        bot: {
            name: 'HarryBotter',
            avatar: 'https://nlux.ai/images/demos/persona-harry-botter.jpg',
            tagline: 'Mischievously Making Magic With Mirthful AI!'
        }
    });

avatar should be replaced with picture

I wanted to fix the error message but I dont see the docs repository
salmenus commented 2 months ago

Thanks for reporting this @FriendlyUser

Docs website is not open-source yet. I will add it to the main @nluxai/nlux repo so anyone can create PRs and contribute. I'll comment on this issue once it's done.

salmenus commented 1 month ago

Docs website source code added here: https://github.com/nluxai/nlux/tree/latest/docs

Hosted on: https://docs.nlkit.com/nlux

Currently working on updating it for v2.x (which is in beta)