mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-09 04:49:26 +00:00
feat: (0.6)New UI (#1855)
Co-authored-by: 夏姜 <wenfengjiang.jwf@digital-engine.com> Co-authored-by: aries_ckt <916701291@qq.com> Co-authored-by: wb-lh513319 <wb-lh513319@alibaba-inc.com> Co-authored-by: csunny <cfqsunny@163.com>
This commit is contained in:
@@ -28,6 +28,7 @@ class PluginPackResourceParameters(PackResourceParameters):
|
||||
cls,
|
||||
parameters: Type["PluginPackResourceParameters"],
|
||||
version: Optional[str] = None,
|
||||
**kwargs,
|
||||
) -> Any:
|
||||
"""Convert the parameters to configurations."""
|
||||
conf: List[ParameterDescription] = cast(
|
||||
@@ -65,13 +66,16 @@ class PluginToolPack(ToolPack):
|
||||
return "tool(autogpt_plugins)"
|
||||
|
||||
@classmethod
|
||||
def resource_parameters_class(cls) -> Type[PluginPackResourceParameters]:
|
||||
def resource_parameters_class(cls, **kwargs) -> Type[PluginPackResourceParameters]:
|
||||
agent_module: ModulePlugin = CFG.SYSTEM_APP.get_component(
|
||||
ComponentType.PLUGIN_HUB, ModulePlugin
|
||||
)
|
||||
|
||||
tool_names = []
|
||||
for name, sub_tool in agent_module.tools._resources.items():
|
||||
tool_names.append(name)
|
||||
tool_names.append(
|
||||
{"label": name, "key": name, "description": sub_tool.description}
|
||||
)
|
||||
|
||||
@dataclasses.dataclass
|
||||
class _DynPluginPackResourceParameters(PluginPackResourceParameters):
|
||||
|
Reference in New Issue
Block a user