We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 83303f8 + f9c7203 commit 78c11deCopy full SHA for 78c11de
web-apps/chat/app.py
@@ -70,7 +70,7 @@ def inference(latest_message, history):
70
context = []
71
if INCLUDE_SYSTEM_PROMPT:
72
context.append(SystemMessage(content=settings.model_instruction))
73
- else:
+ elif history and len(history) > 0:
74
# Mimic system prompt by prepending it to first human message
75
history[0]['content'] = f"{settings.model_instruction}\n\n{history[0]['content']}"
76
0 commit comments