Skip to content

error in perform_action in goat_connection.py #89

@Yaqing2023

Description

@Yaqing2023

currently in goat_connection.py it has

def perform_action(self, action_name: str, **kwargs) -> Any:
    """Execute a GOAT action using a plugin's tool"""
    action = self.actions.get(action_name)
    if not action:
        raise KeyError(f"Unknown action: {action_name}")
    tool = self._action_registry[action_name]
    return tool.execute(kwargs)

when you execute command such as action-agent goat get_address, it throws error
An error occurred while trying action get_address for goat connection: GoatConnection.perform_action() takes 2 positional arguments but 3 were given.
if i change the function definition to def perform_action(self, action_name: str, kwargs) -> Any:
then it works, seems like you need to pass kwargs as a parameter, not a dictionary

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions