refac: tts details tags

This commit is contained in:
Timothy Jaeryang Baek
2025-05-23 13:40:33 +04:00
parent 55a6fae9db
commit dd8e742c2d
3 changed files with 14 additions and 11 deletions
+2 -3
View File
@@ -867,11 +867,10 @@ export const extractSentencesForAudio = (text: string) => {
}, [] as string[]);
};
export const getMessageContentParts = (content: string, split_on: string = 'punctuation') => {
content = removeDetails(content, ['reasoning', 'code_interpreter', 'tool_calls']);
export const getMessageContentParts = (content: string, splitOn: string = 'punctuation') => {
const messageContentParts: string[] = [];
switch (split_on) {
switch (splitOn) {
default:
case TTS_RESPONSE_SPLIT.PUNCTUATION:
messageContentParts.push(...extractSentencesForAudio(content));