Explorar el Código

Fix: list out of boundary (#7843)

### What problem does this PR solve?

Close #7837
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.19.1
Kevin Hu hace 5 meses
padre
commit
1f32e6e4f4
No account linked to committer's email address
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      api/apps/sdk/session.py

+ 1
- 1
api/apps/sdk/session.py Ver fichero

@@ -464,7 +464,7 @@ def list_session(tenant_id, chat_id):
if conv["reference"]:
messages = conv["messages"]
message_num = 0
while message_num < len(messages):
while message_num < len(messages) and message_num < len(conv["reference"]):
if message_num != 0 and messages[message_num]["role"] != "user":
chunk_list = []
if "chunks" in conv["reference"][message_num]:

Cargando…
Cancelar
Guardar