Optimize conversation when uploading attachments (#4964)
### What problem does this PR solve? #4929 ### Type of change - [x] Performance Improvement
This commit is contained in:
parent
f29da49893
commit
88daa349f9
1 changed files with 0 additions and 3 deletions
|
|
@ -204,9 +204,6 @@ def chat(dialog, messages, stream=True, **kwargs):
|
|||
attachments = kwargs["doc_ids"].split(",") if "doc_ids" in kwargs else None
|
||||
if "doc_ids" in messages[-1]:
|
||||
attachments = messages[-1]["doc_ids"]
|
||||
for m in messages[:-1]:
|
||||
if "doc_ids" in m:
|
||||
attachments.extend(m["doc_ids"])
|
||||
|
||||
create_retriever_ts = timer()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue