ragflow/graph/component/__init__.py
GYH cf542e80b3
Add Graph Baidusearch and dsl_example (#1378)
### What problem does this PR solve?

#918 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2024-07-05 09:50:57 +08:00

19 lines
653 B
Python

import importlib
from .begin import Begin, BeginParam
from .generate import Generate, GenerateParam
from .retrieval import Retrieval, RetrievalParam
from .answer import Answer, AnswerParam
from .categorize import Categorize, CategorizeParam
from .switch import Switch, SwitchParam
from .relevant import Relevant, RelevantParam
from .message import Message, MessageParam
from .rewrite import RewriteQuestion, RewriteQuestionParam
from .keyword import KeywordExtract, KeywordExtractParam
from .baidu import Baidu, BaiduParam
def component_class(class_name):
m = importlib.import_module("graph.component")
c = getattr(m, class_name)
return c