ragflow/api/apps/sdk
zhanglei daf6c82066
fix: list index out of range (#8518)
### What problem does this PR solve?

stack:

```
2025-06-26 17:22:24,739 ERROR    1609 list index out of range
Traceback (most recent call last):
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
  File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "/ragflow/api/utils/api_utils.py", line 298, in decorated_function
    return func(*args, **kwargs)
  File "/ragflow/api/apps/sdk/session.py", line 472, in list_session
    print(conv["reference"][message_num])
IndexError: list index out of range

```


![图片](https://github.com/user-attachments/assets/93fe90a8-0434-4842-ba9f-bb5a995b498a)


### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):
2025-06-27 09:38:33 +08:00
..
agent.py Feat: Add http api to create, update, or delete agents. (#7515) 2025-05-12 17:59:53 +08:00
chat.py Fix: sdk can not update chat model (#8016) 2025-06-03 15:22:26 +08:00
dataset.py Fix: Enforce default embedding model in create_dataset / update_dataset (#8486) 2025-06-25 16:41:32 +08:00
dify_retrieval.py Fix Bug: When performing the dify_retrieval, the metadata of the document was empty. (#7968) 2025-05-30 12:58:05 +08:00
doc.py Refa: Implement centralized file name length limit using FILE_NAME_LEN_LIMIT constant (#8318) 2025-06-17 18:01:30 +08:00
session.py fix: list index out of range (#8518) 2025-06-27 09:38:33 +08:00