Skip to content

Commit 0eb727b

Browse files
fix: Adress review comments
Co-authored-by: Anupam Kumar <kyteinsky@gmail.com> Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 881fc04 commit 0eb727b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __call__(
2626
inputs: dict[str, Any],
2727
) -> dict[str, str]:
2828
system_prompt = inputs['system_prompt']
29-
if inputs['memories']:
29+
if inputs.get('memories'):
3030
system_prompt += "\n\nYou can remember things from other conversations with the user. If they are relevant, take into account the following memories: \n" + "\n\n".join(inputs['memories']) + "\n\n"
3131
return {'output': self.runnable.invoke(
3232
[('human', system_prompt)] + [(message['role'], message['content']) for message in [json.loads(message) for message in inputs['history']]] + [('human', inputs['input'])]

0 commit comments

Comments
 (0)