2
0

(api) Add textBubbleContentFormat option

Closes #1111
This commit is contained in:
Baptiste Arnaud
2024-05-23 16:30:56 +02:00
parent 3031d26f03
commit c53ce349af
22 changed files with 155 additions and 37 deletions

View File

@@ -147,6 +147,7 @@ const executeGroup = ({
version: 2,
variables: typebotsQueue[0].typebot.variables,
typebotVersion: typebotsQueue[0].typebot.version,
textBubbleContentFormat: 'markdown',
}
)
const newMessage =
@@ -321,11 +322,11 @@ const convertChatMessageToTranscriptMessage = (
): TranscriptMessage | null => {
switch (chatMessage.type) {
case BubbleBlockType.TEXT: {
if (!chatMessage.content.richText) return null
if (chatMessage.content.type === 'richText') return null
return {
role: 'bot',
type: 'text',
text: convertRichTextToMarkdown(chatMessage.content.richText),
text: chatMessage.content.markdown,
}
}
case BubbleBlockType.IMAGE: {