feat(ai): Append inline name followup to initial greeting to meet IVR expectations
This commit is contained in:
@@ -1708,6 +1708,11 @@ def start_voice_session(session_id: str, payload: VoiceAIStartIn) -> VoiceAIStar
|
||||
greeting_text = _voice_personalized_greeting(language, name_value, config)
|
||||
elif name_status == "name_followup_required":
|
||||
greeting_text = _voice_name_confirmation_greeting(language, name_value, config)
|
||||
else:
|
||||
if config.enabled and config.downstream.missing_name_behavior == "ask_inline_once":
|
||||
inline_prompt = _voice_inline_name_followup(language, config)
|
||||
if inline_prompt and inline_prompt not in greeting_text:
|
||||
greeting_text = f"{greeting_text} {inline_prompt}"
|
||||
session.commit()
|
||||
return VoiceAIStartOut(
|
||||
session_id=ai_session.session_id,
|
||||
|
||||
Reference in New Issue
Block a user