ModifyAppAgentTemplate
Updates an application agent template.
Operation description
QPS limit
The QPS limit for a single user is 10 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Make API calls at a reasonable rate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rtc:ModifyAppAgentTemplate |
none |
*App
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The application ID. You can create and query the ID in the console. Only a single ID is supported. |
ac7N**** |
| Id |
string |
Yes |
The template ID. |
1231231312312131231 |
| Name |
string |
Yes |
The template name. |
Agent template |
| Type |
integer |
No |
The agent type. Valid values:
Valid values:
|
1 |
| ChatMode |
integer |
No |
The conversation mode. Valid values:
Valid values:
|
2 |
| InterruptMode |
integer |
No |
The interruption mode. Valid values:
Valid values:
|
2 |
| Greeting |
string |
No |
The greeting message. The maximum length is 500 characters. |
Good morning, my friend |
| AsrConfig |
object |
No |
The speech-to-text settings. |
|
| Name |
string |
Yes |
The name. |
STT |
| VocabularyId |
string |
No |
The hot word ID. |
0bb1776b1745123332074d1b6b |
| WordWeights |
array<object> |
No |
Each vocabulary can contain up to 500 hot words. Each hot word in Chinese cannot exceed 10 characters. Hot words must be UTF-8 encoded and cannot contain punctuation marks or special characters. Otherwise, the hot words do not take effect. |
|
|
object |
Yes |
The hot word weight. |
||
| Word |
string |
Yes |
The hot word text. Each word can be up to 10 Chinese characters or English words in length. |
Apple |
| Lang |
string |
No |
The language code. This parameter is optional. The large language model automatically identifies the language. Valid values:
|
zh |
| Weight |
integer |
Yes |
The hot word weight. Valid values: integers from 1 to 5. Common value: 4. If the effect is not obvious, you can increase the weight. However, a large weight may cause negative effects and lead to inaccurate recognition of other words. |
4 |
| MaxSentenceSilence |
integer |
No |
The speech segmentation detection threshold. Default value: 500. Valid values: 200 to 6000. Unit: milliseconds. If VadConfig is configured, we recommend that you set this value to greater than VadConfig.InterruptSpeechDuration and less than 1500. |
500 |
| VadConfig |
object |
No |
The voice activity detection (VAD) configurations. |
|
| InterruptSpeechDuration |
integer |
No |
The minimum duration of continuous human voice signals. Unit: milliseconds. Valid values: 0 to 3000. This parameter is used to avoid false interruptions. Default value: 300. |
1000 |
| LlmConfig |
object |
No |
The large language model (LLM) settings. |
|
| Name |
string |
Yes |
The name. |
llm |
| Vendor |
string |
No |
The provider. Valid values: Alibaba Cloud Model Studio and third-party configurations that comply with OpenAI API specifications. Valid values:
|
thirdparty |
| Url |
string |
No |
The endpoint URL for connecting to a third-party LLM. |
https://llm.example.aliyuns.com |
| ApiKey |
string |
Yes |
The API key required by the LLM provider. |
ak-1213123123132123131 |
| Temperature |
number |
No |
The sampling temperature. Valid values: [0, 2). Default value: 0.7. |
0.7 |
| TopP |
number |
No |
The sampling range for top-p. Valid values: (0, 1]. Default value: 0.8. |
0.8 |
| MaxToken |
integer |
No |
The maximum number of tokens for the output text. Default value: 8192. |
1024 |
| HistoryDepth |
integer |
No |
The number of historical conversation turns provided to the LLM. Maximum value: 100. Default value: 50. |
8 |
| Prompt |
string |
No |
The prompt for the LLM. The maximum length is 5,000 characters. |
Hello, Doraemon |
| AgentAppId |
string |
No |
The ID of the agent in Model Studio. |
1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d |
| TtsConfig |
object |
No |
The text-to-speech (TTS) settings. |
|
| Name |
string |
Yes |
The name. |
Tts |
| Vendor |
string |
Yes |
The provider. Currently, only Alibaba Cloud Model Studio is supported. Valid values:
|
aliyun |
| ApiKey |
string |
Yes |
The API key required by the LLM provider. |
ak-1213123123132123131 |
| Voice |
string |
No |
The voice. Default value: longxiaoxia. Valid values:
|
longwan |
| Volume |
integer |
No |
The volume. Valid values: 0 to 100. Default value: 50. |
50 |
| Rate |
number |
No |
The speech rate. Valid values: 0.5 to 2.0. Default value: 1.0. |
0.8 |
| Pitch |
number |
No |
The pitch. Valid values: 0.5 to 2.0. Default value: 1.0. |
0.8 |
| FilterBrackets |
array |
No |
The filter settings. Valid values:
|
|
|
integer |
No |
The specific field. Valid values:
|
1 |
|
| AgentSilenceConfig |
object |
No |
The agent silence configuration. |
|
| AlertTimeout |
integer |
No |
The timeout for silence alerts, in seconds. This alert can be triggered multiple times. If the agent remains silent after the timeout, the alert is triggered again upon the next timeout. Valid values: 5 to 600. Default value: 0. A value of 0 indicates that no alert is triggered. |
30 |
| WebhookTriggerTimeout |
integer |
No |
The timeout for triggering the agent silence timeout webhook, in seconds. This webhook can be triggered multiple times. If the agent remains silent after the webhook timeout, the webhook is triggered again upon the next timeout. Valid values: 10 to 600. Default value: 0. A value of 0 indicates that the webhook is not triggered. |
30 |
| Strategy |
integer |
No |
The silence timeout handling strategy. Valid values:
|
2 |
| Content |
string |
No |
The content of the silence prompt message. |
Hello, your request is being processed. Please try again later. Is that okay? |
| AmbientSoundConfig |
object |
No |
The agent ambient environment configuration. If this parameter is not specified, the ambient environment configuration is not used. |
|
| SoundId |
string |
No |
The default ambient sounds provided by the agent. Valid values: - white_noise - office |
white_noise |
| Volume |
integer |
No |
The volume. |
100 |
| InterruptConfig |
object |
No |
The agent interruption configuration. |
|
| SemanticsInterrupt |
boolean |
No |
Specifies whether to interrupt based on semantics. |
|
| BackChannelConfig |
object |
No |
The agent backchannel configuration. |
|
| UserTurnEnd |
boolean |
No |
Specifies whether to enable backchanneling. |
|
| EnableVideoUnderstanding |
boolean |
No |
Specifies whether to enable video understanding. If enabled, the LLM must support multimodal data. |
|
| PreferVideo |
integer |
No |
The preferred video stream for the agent to understand after visual understanding is enabled. The agent can understand only one video stream. When both the camera stream and the screen sharing stream are pushed: 1 - The agent prioritizes the camera stream. 2 - The agent prioritizes the screen sharing stream. By default, the agent prioritizes the camera stream. |
2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
231470C1-ACFB-4C9F-844F-4CFE1E3804C5 |
| Id |
string |
The template ID. |
1223131213231313213 |
Examples
Success response
JSON format
{
"RequestId": "231470C1-ACFB-4C9F-844F-4CFE1E3804C5",
"Id": "1223131213231313213"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterError | %s. | |
| 404 | NotFound | %s. | The requested resource does not exist |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.