lg-chat LeafyGreen Chat Context
npm install @lg-chat/leafygreen-chat-provider``shell`
pnpm add @lg-chat/leafygreen-chat-provider
`shell`
yarn add @lg-chat/leafygreen-chat-provider
`shell`
npm install @lg-chat/leafygreen-chat-provider
LeafyGreenChatProvider provides context to LG Chat components, including the assistant name that will be displayed in messages.
`tsx
import { LeafyGreenChatProvider } from '@lg-chat/leafygreen-chat-provider';
function App() {
return (
{/ chat components /}
);
}
`
`tsx
import { LeafyGreenChatProvider } from '@lg-chat/leafygreen-chat-provider';
function App() {
return (
{/ chat components /}
);
}
`
| Prop | Type | Description | Default |
| ---------------------------- | ----------- | ----------------------------------------------------------------------------------- | --------------------- |
| assistantName _(optional)_ | string | The name of the AI assistant that will be displayed when AI sends messages to users | 'MongoDB Assistant' |children
| | ReactNode` | The chat components to be wrapped by the provider | |