ModifyAppAgentTemplate

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rtc:ModifyAppAgentTemplate

none

*App

acs:rtc::{#accountId}:app/{#AppId}

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:

  • 1: Voice call (default).

Valid values:

  • 1

1

ChatMode

integer

No

The conversation mode. Valid values:

  • 1: Natural conversation mode (default).

  • 2: Walkie-talkie mode.

Valid values:

  • 1
  • 2

2

InterruptMode

integer

No

The interruption mode. Valid values:

  • 1: Interruption supported (default).

  • 2: Interruption disabled.

Valid values:

  • 1
  • 2

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: Chinese.

  • en: English.

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:

  • aliyun
  • thirdparty
  • dingtalk

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
  • customized
  • dingmaas

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

  • longcheng

  • longhua

  • longxiaochun

  • longxiaoxia

  • longxiaocheng

  • longxiaobai

  • longlaotie

  • longshu

  • longshuo

  • longjing

  • longmiao

  • longyue

  • longyuan

  • longfei

  • longjielidou

  • longtong

  • longxiang

  • loongstella

  • loongbella

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:

  • 1: Chinese parentheses ()

  • 2: English parentheses ()

  • 3: Chinese square brackets 【】

  • 4: English square brackets []

  • 5: English curly braces {}

integer

No

The specific field.

Valid values:

  • 1
  • 2
  • 3
  • 4
  • 5

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:

  • 1: Broadcast the prompt message specified by content to the user.

  • 2: Send the prompt message specified by content and the conversation history to the LLM, and broadcast the reply generated by the model. Default value: 1.

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.