Skip to content

Commit

Permalink
slots fix for email (#1655)
Browse files Browse the repository at this point in the history
Co-authored-by: spandan_mondal <[email protected]>
  • Loading branch information
hasinaxp and spandan_mondal authored Dec 13, 2024
1 parent 799fc8d commit e7ae941
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kairon/shared/channels/mail/processor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import json
import time

from loguru import logger
Expand Down Expand Up @@ -185,8 +186,8 @@ async def process_messages(bot: str, batch: [dict]):
'date': mail['date'],
'body': mail['body']
}
entities_str = ', '.join([f'"{key}": "{value}"' for key, value in entities.items() if value and value != 'null'])
user_msg = f'/{mp.intent}{{{entities_str}}}'
entities_str = json.dumps(entities)
user_msg = f'/{mp.intent}{entities_str}'
user_messages.append(user_msg)
subject = mail.get('subject', 'Reply')
if not subject.startswith('Re:'):
Expand Down

0 comments on commit e7ae941

Please sign in to comment.