-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update document * Update --------- Co-authored-by: ziyuhehe <[email protected]>
- Loading branch information
Showing
31 changed files
with
2,993 additions
and
2,447 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
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
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
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,54 @@ | ||
--- | ||
title: Bot consumption page APIs | ||
description: Describes which Embedding SDK APIs are available on the MicroStrategy Bot consumption page. | ||
--- | ||
|
||
The `embedBotConsumptionPage` object is the manipulator of the MicroStrategy dashboard consumption page. It could be got by `embeddingContext.embedBotConsumptionPage`. | ||
|
||
The details of the `embeddingContext` object could be seen in [Embedding context](./embedding-context.md). | ||
|
||
The APIs under embed botConsumption page object are as below. | ||
|
||
### `askQuestion(questionParams)` | ||
|
||
#### Description | ||
|
||
This API can be used to ask a question to a bot consumption page which is already loaded. | ||
If the bot consumption page is loading then the question will be triggered after it is initialized | ||
|
||
#### Class | ||
|
||
`BotConsumptionService` | ||
|
||
#### Input Parameters | ||
|
||
- `questionParams`: | ||
|
||
**Data Type** | ||
|
||
`object` | ||
|
||
**Required?** | ||
|
||
Yes | ||
|
||
#### Return type | ||
|
||
This API would return a Promise object that resolves to nothing. | ||
|
||
#### Example | ||
|
||
```js | ||
await embeddingContext.botConsumptionService.askQuestion({ | ||
questionText: "how are you?", | ||
type: "text", | ||
}); | ||
``` | ||
|
||
#### API errors | ||
|
||
This API would report an error in these 3 cases: | ||
|
||
- When the whole `questionParams` is not provided. | ||
- When `questionText` is not provided. | ||
- When `type` is not provided. |
Oops, something went wrong.