Skip to content

Commit 5bee62f

Browse files
authored
Merge pull request #39 from seymourtang/feat/convoai
feat: Add silence message and timeout properties to JoinPropertiesCustomLLMBody and JoinPropertiesReqBody for enhanced agent control
2 parents 6dd767a + b1e761b commit 5bee62f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

services/convoai/req/join.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,16 @@ type JoinPropertiesCustomLLMBody struct {
199199
//
200200
// If filled, it will be returned through the TTS module when the LLM call fails.
201201
FailureMessage string `json:"failure_message,omitempty"`
202+
203+
// Silence message for the agent (optional)
204+
//
205+
// After the agent is created and a user joins the channel,
206+
// the duration of the agent's non-listening, thinking, or speaking state is called the agent's silence time.
207+
// When the silence time reaches the set value, the agent will report the silence prompt message in llm.silence_message,
208+
// and then recalculate the silence time.
209+
//
210+
// When silence_timeout is set to 0, this parameter is ignored.
211+
SilenceMessage *string `json:"silence_message,omitempty"`
202212
}
203213

204214
// @brief Defines the Voice Activity Detection (VAD) configuration for the agent to join the RTC channel
@@ -268,6 +278,19 @@ type JoinPropertiesReqBody struct {
268278
// If set to 0, the agent will not stop until manually exited
269279
IdleTimeout *int `json:"idle_timeout,omitempty"`
270280

281+
// Silence timeout (s) (optional)
282+
//
283+
// The maximum silence time of the agent (s), range is [0,60].
284+
//
285+
// After the agent is created and a user joins the channel, the duration of the agent's non-listening, thinking, or speaking state is called the agent's silence time.
286+
//
287+
// When the silence time reaches the set value, the agent will report the silence prompt message in llm.silence_message, and then recalculate the silence time.
288+
//
289+
// - 0 (default): Do not enable this feature.
290+
//
291+
// - (0,60]: Must also set llm.silence_message to enable the feature.
292+
SilenceTimeout *int `json:"silence_timeout,omitempty"`
293+
271294
// Agent user ID in the RTM channel
272295
//
273296
// Only valid when advanced_features.enable_rtm is true

0 commit comments

Comments
 (0)