mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 16:56:02 +00:00
fix
This commit is contained in:
@@ -41,13 +41,19 @@ class ReplyMessageNode(WorkflowNode):
|
||||
for key, value in inputs.items():
|
||||
try:
|
||||
message = message.replace(f'{{{{{key}}}}}', str(value) if value is not None else '')
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.debug(
|
||||
'ReplyMessageNode failed to replace input template variable',
|
||||
extra={'node_id': self.node_id, 'key': str(key), 'error': str(e)},
|
||||
)
|
||||
for key, value in context.variables.items():
|
||||
try:
|
||||
message = message.replace(f'{{{{variables.{key}}}}}', str(value) if value is not None else '')
|
||||
except Exception:
|
||||
pass
|
||||
except Exception as e:
|
||||
logger.debug(
|
||||
'ReplyMessageNode failed to replace context template variable',
|
||||
extra={'node_id': self.node_id, 'key': str(key), 'error': str(e)},
|
||||
)
|
||||
|
||||
message_str = str(message) if message is not None else ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user