RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
make cites in conversation API configurable (#576)
KevinHuSh038822f3bdd3
diff --git a/api/db/services/dialog_service.py b/api/db/services/dialog_service.pyindex db1d6241f1..ed8b050395 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.mdindex 81d7ef34be..2e675edf84 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