mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 04:26:05 +08:00
make cites in conversation API configurable (#576)
### What problem does this PR solve? #566 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
ae501c58fa
commit
038822f3bd
@ -136,7 +136,7 @@ def chat(dialog, messages, **kwargs):
|
||||
chat_logger.info("User: {}|Assistant: {}".format(
|
||||
msg[-1]["content"], answer))
|
||||
|
||||
if knowledges and prompt_config.get("quote", True):
|
||||
if knowledges and (prompt_config.get("quote", True) and kwargs.get("quote", True)):
|
||||
answer, idx = retrievaler.insert_citations(answer,
|
||||
[ck["content_ltks"]
|
||||
for ck in kbinfos["chunks"]],
|
||||
|
@ -221,6 +221,7 @@ This will be called to get the answer to users' questions.
|
||||
|------|-------|----|----|
|
||||
| conversation_id| string | No | This is from calling /new_conversation.|
|
||||
| messages| json | No | All the conversation history stored here including the latest user's question.|
|
||||
| quote | bool | Yes | Default: true |
|
||||
|
||||
### Response
|
||||
```json
|
||||
|
Loading…
x
Reference in New Issue
Block a user