We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae7e206 commit f9c7203Copy full SHA for f9c7203
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