mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-29 21:38:09 +00:00
* feat: local search tool call result display * chore: add file copyright * fix: miss edit plan interrupt feedback * feat: disable pasting html into input box
15 lines
502 B
Python
15 lines
502 B
Python
# Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
from src.config.tools import SELECTED_RAG_PROVIDER, RAGProvider
|
|
from src.rag.ragflow import RAGFlowProvider
|
|
from src.rag.retriever import Retriever
|
|
|
|
|
|
def build_retriever() -> Retriever | None:
|
|
if SELECTED_RAG_PROVIDER == RAGProvider.RAGFLOW.value:
|
|
return RAGFlowProvider()
|
|
elif SELECTED_RAG_PROVIDER:
|
|
raise ValueError(f"Unsupported RAG provider: {SELECTED_RAG_PROVIDER}")
|
|
return None
|