CreateAppAgentTemplate
Creates an application agent template.
Operation description
QPS limit
The QPS limit per user for this API operation is 10. Exceeding this limit triggers throttling, which may affect your services. Call this operation at a reasonable rate.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
rtc:CreateAppAgentTemplate |
none |
*App
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The application ID. You can create and query application IDs in the console. Only a single ID is supported. |
ac7N**** |
| Name |
string |
Yes |
The name of the template. |
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 |
| MaxSentenceSilence |
integer |
No |
The threshold for voice activity detection (VAD) sentence segmentation. Unit: milliseconds. Valid values: 200 to 6000. Default value: 500. If VadConfig is configured, we recommend that you set this value to a number greater than VadConfig.InterruptSpeechDuration and less than 1500. |
300 |
| WordWeights |
array<object> |
No |
The hotword weights. Each vocabulary can contain up to 500 hotwords, and each hotword can be up to 10 Chinese characters in length. Hotwords must be UTF-8 encoded and cannot contain punctuation marks or special characters. Otherwise, the hotword feature does not take effect. |
|
|
object |
Yes |
The hotword weight. |
||
| Word |
string |
Yes |
The text of the hotword. Each hotword 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 (LLM) automatically identifies the language. Valid values:
|
zh |
| Weight |
integer |
Yes |
The weight of the hotword. 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 |
| VadConfig |
object |
No |
The VAD configuration. |
|
| InterruptSpeechDuration |
integer |
No |
The minimum duration of continuous human voice signals to avoid false interruptions. Unit: milliseconds. Valid values: 0 to 3000. Default value: 300. |
1000 |
| LlmConfig |
object |
No |
The large language model (LLM) settings. |
|
| Name |
string |
Yes |
The name. |
llm |
| Vendor |
string |
Yes |
The vendor. Alibaba Cloud Model Studio and third-party configurations that comply with the OpenAI API specification are supported. 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 service provider. |
ak-1213123123132123131 |
| Temperature |
number |
No |
The sampling temperature. Valid values: [0, 2). Default value: 0.7. |
0.9 |
| TopP |
number |
No |
The top-p sampling range. 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. |
5 |
| Prompt |
string |
No |
The prompt for the LLM. The maximum length is 5000 characters. |
You are a senior psychologist |
| AgentAppId |
string |
No |
The ID of the Model Studio agent. |
1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d |
| TtsConfig |
object |
No |
The text-to-speech settings. |
|
| Name |
string |
Yes |
The name. |
Tts |
| Vendor |
string |
No |
The vendor. Alibaba Cloud Model Studio is supported. Valid values:
|
aliyun |
| ApiKey |
string |
Yes |
The API key required by the LLM service provider. |
ak-1213123123132123131 |
| Voice |
string |
No |
The voice. Default value: longxiaoxia. Valid values:
|
longcheng |
| Volume |
integer |
No |
The volume. Valid values: 0 to 100. Default value: 50. |
70 |
| 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 period for silence alerts, in seconds. This alert can be triggered multiple times. If the agent remains silent after the timeout period elapses, 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 silence timeout period 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 period elapses, 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 handling strategy for silence timeout. Valid values:
|
2 |
| Content |
string |
No |
The content of the silence prompt message. |
Hello, please try again later |
| AmbientSoundConfig |
object |
No |
The ambient environment configuration for the agent. If this parameter is not passed, the ambient environment configuration is not used. |
|
| SoundId |
string |
No |
The default ambient sounds provided by the agent. Valid values:
|
white_noise |
| Volume |
integer |
No |
The volume level. |
100 |
| InterruptConfig |
object |
No |
The interruption configuration for the agent. |
|
| SemanticsInterrupt |
boolean |
No |
Specifies whether to interrupt based on semantics. |
|
| BackChannelConfig |
object |
No |
The backchannel configuration for the agent. |
|
| UserTurnEnd |
boolean |
No |
Specifies whether to enable backchannel words. |
|
| 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 process after visual understanding is enabled. The agent can process only one video stream. When both the camera stream and the screen sharing stream are pushed, valid values are:
|
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
6159ba01-6687-4fb2-a831-f0cd8d188648 |
| Id |
string |
The template ID. |
1223131213231313213 |
Examples
Success response
JSON format
{
"RequestId": "6159ba01-6687-4fb2-a831-f0cd8d188648",
"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.