diff --git a/api/db/services/dialog_service.py b/api/db/services/dialog_service.py index db1d6241f..ed8b05039 100644 --- a/api/db/services/dialog_service.py +++ b/api/db/services/dialog_service.py @@ -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"]], diff --git a/docs/conversation_api.md b/docs/conversation_api.md index 81d7ef34b..2e675edf8 100644 --- a/docs/conversation_api.md +++ b/docs/conversation_api.md @@ -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