mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 06:18:58 +08:00
Fix the issue where the agent interface cannot call the context (#3725)
### What problem does this PR solve? Fix the context of the agent interface call to the context during web testing, and change it to the context record of user chat Remove duplicate messages and add them, which can be viewed in the messages section of database api_4_comversation ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com> Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
parent
834c4d81f3
commit
fcdc6ad085
@ -308,7 +308,6 @@ def agent_completion(tenant_id, agent_id):
|
|||||||
if 'docnm_kwd' in chunk_i:
|
if 'docnm_kwd' in chunk_i:
|
||||||
chunk_i['doc_name'] = chunk_i['docnm_kwd']
|
chunk_i['doc_name'] = chunk_i['docnm_kwd']
|
||||||
chunk_i.pop('docnm_kwd')
|
chunk_i.pop('docnm_kwd')
|
||||||
conv.message.append(msg[-1])
|
|
||||||
|
|
||||||
if not conv.reference:
|
if not conv.reference:
|
||||||
conv.reference = []
|
conv.reference = []
|
||||||
@ -317,7 +316,6 @@ def agent_completion(tenant_id, agent_id):
|
|||||||
|
|
||||||
final_ans = {"reference": [], "content": ""}
|
final_ans = {"reference": [], "content": ""}
|
||||||
|
|
||||||
canvas.messages.append(msg[-1])
|
|
||||||
canvas.add_user_input(msg[-1]["content"])
|
canvas.add_user_input(msg[-1]["content"])
|
||||||
|
|
||||||
if stream:
|
if stream:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user