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: if n > 0:
meta_log["chat"] = meta_log["chat"][-n:] meta_log["chat"] = meta_log["chat"][-n:]
# Else return all messages except latest N # Else return all messages except latest N
else: elif n < 0:
meta_log["chat"] = meta_log["chat"][:n] meta_log["chat"] = meta_log["chat"][:n]
update_telemetry_state( update_telemetry_state(