mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
add prompt to message (#2099)
### What problem does this PR solve? #2098 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -140,7 +140,8 @@ def completion():
|
||||
if not conv.reference:
|
||||
conv.reference.append(ans["reference"])
|
||||
else: conv.reference[-1] = ans["reference"]
|
||||
conv.message[-1] = {"role": "assistant", "content": ans["answer"], "id": message_id}
|
||||
conv.message[-1] = {"role": "assistant", "content": ans["answer"],
|
||||
"id": message_id, "prompt": ans.get("prompt", "")}
|
||||
|
||||
def stream():
|
||||
nonlocal dia, msg, req, conv
|
||||
|
||||
Reference in New Issue
Block a user