support graph (#1152)
### What problem does this PR solve? #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
16
graph/component/__init__.py
Normal file
16
graph/component/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
|
||||
|
||||
def component_class(class_name):
|
||||
m = importlib.import_module("graph.component")
|
||||
c = getattr(m, class_name)
|
||||
return c
|
||||
Reference in New Issue
Block a user