File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ FULL MEETING CONVERSATION:
7777${ context . fullConversation || 'No conversation available' } ${ aiConversationsText }
7878
7979INSTRUCTIONS:
80- 1. Be concise and helpful - keep responses under ~200 words
80+ 1. Be concise and helpful - keep responses under ~200 words. You should NEVER exceed 4096 characters.
81812. Use the meeting context and full conversation history to provide relevant insights
82823. If asked about specific topics, provide thoughtful analysis based on the context
83834. Be professional but friendly in tone
Original file line number Diff line number Diff line change @@ -114,8 +114,17 @@ class RecallService {
114114
115115 async sendChatMessage ( botId , message , recipient = 'everyone' ) {
116116 try {
117+ // Recall.ai has a 4096 character limit for chat messages
118+ const MAX_MESSAGE_LENGTH = 4096 ;
119+ let processedMessage = message ;
120+
121+ if ( message . length > MAX_MESSAGE_LENGTH ) {
122+ logger . logWarn ( `Message too long (${ message . length } chars), truncating to ${ MAX_MESSAGE_LENGTH } chars` ) ;
123+ processedMessage = message . substring ( 0 , MAX_MESSAGE_LENGTH - 20 ) + '... [message truncated]' ;
124+ }
125+
117126 const messageData = {
118- message : message ,
127+ message : processedMessage ,
119128 to : recipient
120129 } ;
121130
You can’t perform that action at this time.
0 commit comments