Skip to content

Commit

Permalink
Added conversationStarters to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
salmenus committed Jun 11, 2024
1 parent daa074b commit e0d621b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type ConversationLayout = 'bubbles' | 'list';
| `autoScroll` | `boolean` | `true` | If `true`, the conversation will scroll to the bottom when a new message is being added. |
| `historyPayloadSize` | `number` \| `'max'` | `'max'` | The number of messages from the conversation history to be sent to the backend whenver a message is submitted. If set to `0`, no messages will be sent to the server. If set to `'max'`, all the conversation messages will be sent to the server everytime time a prompt is submitted. |
| `showWelcomeMessage` | `boolean` | `true` | If `true`, the assistant's logo and tagline will be displayed when the conversation starts. The NLUX will be shown is no assistant persona is provided. Set to `false` to hide the welcome message. |
| `conversationStarters` | `ConversationStarter[]` | `[]` | An array of conversation starters to be displayed to initiate the conversation. |


> * Usage:
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type ConversationLayout = 'bubbles' | 'list';
| `autoScroll` | `boolean` | `true` | If `true`, the conversation will scroll to the bottom when a new message is being added. |
| `historyPayloadSize` | `number` \| `'max'` | `'max'` | The number of messages from the conversation history to be sent to the backend whenver a message is submitted. If set to `0`, no messages will be sent to the server. If set to `'max'`, all the conversation messages will be sent to the server everytime time a prompt is submitted. |
| `showWelcomeMessage` | `boolean` | `true` | If `true`, the assistant's logo and tagline will be displayed when the conversation starts. The NLUX will be shown is no assistant persona is provided. Set to `false` to hide the welcome message. |
| `conversationStarters` | `ConversationStarter[]` | `[]` | An array of conversation starters to be displayed to initiate the conversation. |


> * Usage:
6 changes: 6 additions & 0 deletions packages/js/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ export type {
} from './aiChat/options/conversationOptions';

export type {ComposerOptions} from './aiChat/options/composerOptions';

export type {
ResponseRenderer,
PromptRendererProps,
PromptRenderer,
MessageOptions,
} from './aiChat/options/messageOptions';

export type {DisplayOptions} from './aiChat/options/displayOptions';

export type {
Expand All @@ -28,6 +30,10 @@ export type {
UserPersona,
} from './aiChat/options/personaOptions';

export type {
ConversationStarter,
} from './types/conversationStarter';

export type {
IObserver,
} from './bus/observer';
Expand Down
4 changes: 4 additions & 0 deletions packages/react/core/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export type {
PromptRendererProps,
} from './exports/messageOptions';

export type {
ConversationStarter,
} from './types/conversationStarter';

export {
AiChat,
} from './exports/AiChat';
Expand Down
2 changes: 1 addition & 1 deletion pipeline/npm/versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"inherit": true,
"nlux": "2.5.0",
"nlux": "2.5.1",
"peerDependencies": {
"react": "18",
"react-dom": "18"
Expand Down

0 comments on commit e0d621b

Please sign in to comment.