mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 12:35:58 +08:00
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
@ -204,9 +204,6 @@ def chat(dialog, messages, stream=True, **kwargs):
|
|||||||
attachments = kwargs["doc_ids"].split(",") if "doc_ids" in kwargs else None
|
attachments = kwargs["doc_ids"].split(",") if "doc_ids" in kwargs else None
|
||||||
if "doc_ids" in messages[-1]:
|
if "doc_ids" in messages[-1]:
|
||||||
attachments = messages[-1]["doc_ids"]
|
attachments = messages[-1]["doc_ids"]
|
||||||
for m in messages[:-1]:
|
|
||||||
if "doc_ids" in m:
|
|
||||||
attachments.extend(m["doc_ids"])
|
|
||||||
|
|
||||||
create_retriever_ts = timer()
|
create_retriever_ts = timer()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user