Mohammed Tawileh commited on
Commit
6873540
·
1 Parent(s): 149b3bf

fix: standardize property name from 'chat' to 'chat_id' (#3383)

Browse files

### 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)

Files changed (1) hide show
  1. api/apps/sdk/session.py +1 -1
api/apps/sdk/session.py CHANGED
@@ -387,7 +387,7 @@ def list(chat_id,tenant_id):
387
  for info in infos:
388
  if "prompt" in info:
389
  info.pop("prompt")
390
- conv["chat"] = conv.pop("dialog_id")
391
  if conv["reference"]:
392
  messages = conv["messages"]
393
  message_num = 0
 
387
  for info in infos:
388
  if "prompt" in info:
389
  info.pop("prompt")
390
+ conv["chat_id"] = conv.pop("dialog_id")
391
  if conv["reference"]:
392
  messages = conv["messages"]
393
  message_num = 0