-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(AIResponse): add AI Response documentation
- Loading branch information
1 parent
1a60a5e
commit 5388151
Showing
7 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#### Live Demo | ||
<br/> | ||
|
||
<Preview name='components-ai-ai-response-beta-all--all' /> | ||
|
||
#### Props | ||
<PreviewWithPropTable name='components-ai-ai-response-beta-all--all' /> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
title: AI Response | ||
description: AI response is used to deliver information from Sara to the user. | ||
tabs: ['Usage', 'Code'] | ||
showMobile: true | ||
keywords: ['Chat', 'Response', 'AI Chat', 'Chat box'] | ||
--- | ||
|
||
<Preview name="components-ai-ai-response-beta-all--all" /> | ||
|
||
### States | ||
|
||
AI Response has **2 states** - default and generating. | ||
|
||
 | ||
<Caption>States</Caption> | ||
|
||
### Structure | ||
|
||
 | ||
<Caption>Structure - AI Response</Caption> | ||
|
||
<br /> | ||
|
||
<table style={{width: "100%"}}> | ||
<tbody> | ||
<tr> | ||
<th style={{width:"50%", textAlign: "left"}}>Padding and Spacing</th> | ||
<th style={{width:"50%", textAlign: "left"}}>Value(s)</th> | ||
</tr> | ||
<tr style={{verticalAlign: "top"}}> | ||
<td>Top and Bottom</td> | ||
<td>8px, 12px</td> | ||
</tr> | ||
<tr style={{verticalAlign: "top"}}> | ||
<td>Left and Right</td> | ||
<td>12px, 12px</td> | ||
</tr> | ||
<tr style={{verticalAlign: "top"}}> | ||
<td>Spacing between Avatar and Bubble</td> | ||
<td>8px</td> | ||
</tr> | ||
<tr style={{verticalAlign: "top"}}> | ||
<td>Spacing between Metadata and Bubble</td> | ||
<td>2px</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<br /> | ||
|
||
### Configurations | ||
|
||
<br /> | ||
|
||
<table style={{width: "100%"}}> | ||
<tbody> | ||
<tr> | ||
<th style={{width:"33%", textAlign: "left"}}>Property</th> | ||
<th style={{width:"33%", textAlign: "left"}}>Value(s)</th> | ||
<th style={{width:"33%", textAlign: "left"}}>Default value</th> | ||
</tr> | ||
<tr style={{verticalAlign: "top"}}> | ||
<td>Avatar (optional)</td> | ||
<td> | ||
<ul> | ||
<li>True</li> | ||
<li>False</li> | ||
</ul> | ||
</td> | ||
<td>True</td> | ||
</tr> | ||
<tr style={{verticalAlign: "top"}}> | ||
<td>Action Bar (optional)</td> | ||
<td> | ||
<ul> | ||
<li>True</li> | ||
<li>False</li> | ||
</ul> | ||
</td> | ||
<td>True</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<br/> | ||
|
||
### Behavior | ||
|
||
#### Tooltip on actions | ||
|
||
It is recommended to display a tooltip when hovering over icon buttons within an AI response. | ||
|
||
 | ||
<Caption>Tooltip on Icon Buttons</Caption> | ||
|
||
### Usage | ||
|
||
#### Custom response | ||
|
||
AI responses are highly customizable and can incorporate a wide range of components to meet diverse use cases. | ||
|
||
 | ||
<Caption>Custom Content inside AI Response</Caption> |