Only use chat messages count in history API endpoint when set by client

This commit is contained in:
Debanjum Singh Solanky 2024-04-15 19:05:10 +05:30
parent 6b3ef61dd2
commit 7fab8d6586

View file

@ -114,7 +114,7 @@ def chat_history(
if n > 0:
meta_log["chat"] = meta_log["chat"][-n:]
# Else return all messages except latest N
else:
elif n < 0:
meta_log["chat"] = meta_log["chat"][:n]
update_telemetry_state(