From 95d21e5d9f0d6323a1ebdbc28d42cb1cbdd13ae9 Mon Sep 17 00:00:00 2001 From: Mohammed Tawileh <38083272+mktawileh@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:49:03 +0300 Subject: [PATCH] fix: standardize property name from 'chat' to 'chat_id' (#3383) ### What problem does this PR solve? This PR addresses the inconsistency in property naming within the codebase by renaming the 'chat' property to 'chat_id' in the session.py file. This change aims to align the naming convention with other parts of the application that refer to chat identifiers as 'chat_id', thereby improving code clarity and maintainability. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/apps/sdk/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/apps/sdk/session.py b/api/apps/sdk/session.py index e67bbe92d..b6641b107 100644 --- a/api/apps/sdk/session.py +++ b/api/apps/sdk/session.py @@ -387,7 +387,7 @@ def list(chat_id,tenant_id): for info in infos: if "prompt" in info: info.pop("prompt") - conv["chat"] = conv.pop("dialog_id") + conv["chat_id"] = conv.pop("dialog_id") if conv["reference"]: messages = conv["messages"] message_num = 0