You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Web/Resgrid.Web.Services/Twilio/TwilioVoiceResponseService.cs
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -188,11 +188,14 @@ public System.Threading.Tasks.Task PreWarmPromptAsync(string text, string voice
188
188
{
189
189
ArgumentException.ThrowIfNullOrWhiteSpace(text);
190
190
191
-
// Start the generation task (or return the existing one) without
191
+
varchunks=ChunkText(text).ToList();
192
+
if(chunks.Count!=1)
193
+
thrownewArgumentException($"PreWarmPromptAsync does not support multi-chunk input (got {chunks.Count} chunks). Use AppendPromptAsync for multi-chunk text.",nameof(text));
194
+
192
195
// Start the generation task (or return the existing one) without
193
196
// necessarily awaiting it. The TTS microservice's internal cache
194
197
// persists across requests, so a subsequent call will find the URL.
thrownewArgumentException($"GetPromptUrlAsync does not support multi-chunk input (got {chunks.Count} chunks). Use AppendPromptAsync for multi-chunk text.",nameof(text));
0 commit comments