Fixed the problem of loading only one plugin when there are multiple … (#1282)

This commit is contained in:
ASTLY 2024-03-13 10:11:12 +08:00 committed by GitHub
parent 04b6402720
commit 6df9f79f69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,10 +49,12 @@ class PluginAssistantAgent(ConversableAgent):
plugin_loader_client: ResourcePluginClient = (
self.resource_loader.get_resesource_api(ResourceType.Plugin)
)
item_list = []
for item in self.resources:
if item.type == ResourceType.Plugin:
self.plugin_generator = await plugin_loader_client.a_load_plugin(
item.value, self.plugin_generator
item_list.append(item.value)
self.plugin_generator = await plugin_loader_client.a_load_plugin(
item_list, self.plugin_generator
)
def prepare_act_param(self) -> Optional[Dict]: