We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望有一些通用的node,可以在不同的chain中复用。以直播场景为例,“我关注的正在直播的主播”和“首页直播推荐”这两个场景,我用两个chain编排,其中,都需要查询主播的信息,我希望“查询主播的信息”成为一个通用的算子。
为此,我想到一个解决办法,就是定义一个BaseContext,所有想用通用算子的chain的Context,都必须继承BaseContext,我在这个通用的算子里用如下方式获取BaseContext:
BaseContext context = this.getContextBean(BaseContext.class);
报如下错误:
Caused by: com.yomahub.liteflow.exception.NoSuchContextBeanException: this type is not in the context type passed in at com.yomahub.liteflow.slot.Slot.getContextBean(Slot.java:464) at com.yomahub.liteflow.core.NodeComponent.getContextBean(NodeComponent.java:258)
请教,继承是不是解决此类问题的比较合适的办法,希望后续迭代针对这个场景的能力。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一、场景描述
希望有一些通用的node,可以在不同的chain中复用。以直播场景为例,“我关注的正在直播的主播”和“首页直播推荐”这两个场景,我用两个chain编排,其中,都需要查询主播的信息,我希望“查询主播的信息”成为一个通用的算子。
二、尝试的办法
1、继承
为此,我想到一个解决办法,就是定义一个BaseContext,所有想用通用算子的chain的Context,都必须继承BaseContext,我在这个通用的算子里用如下方式获取BaseContext:
报如下错误:
三、诉求
请教,继承是不是解决此类问题的比较合适的办法,希望后续迭代针对这个场景的能力。
The text was updated successfully, but these errors were encountered: