Skip to content

Commit

Permalink
Fix tools
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Aug 20, 2024
1 parent d3c14b1 commit 7bdb00b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions griptape/mixins/activity_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ def activity_name(self, activity: Callable) -> str:
def activity_description(self, activity: Callable) -> str:
if activity is None or not getattr(activity, "is_activity", False):
raise Exception("This method is not an activity.")
return Template(getattr(activity, "configs")["description"]).render({"_self": self})
return Template(getattr(activity, "config")["description"]).render({"_self": self})

def activity_schema(self, activity: Callable) -> Optional[Schema]:
if activity is None or not getattr(activity, "is_activity", False):
raise Exception("This method is not an activity.")
if getattr(activity, "configs")["schema"] is not None:
if getattr(activity, "config")["schema"] is not None:
# Need to deepcopy to avoid modifying the original schema
config_schema = deepcopy(getattr(activity, "configs")["schema"])
config_schema = deepcopy(getattr(activity, "config")["schema"])
activity_name = self.activity_name(activity)

if self.extra_schema_properties is not None and activity_name in self.extra_schema_properties:
Expand Down
2 changes: 1 addition & 1 deletion griptape/utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def wrapper(self: Any, *args, **kwargs) -> Any:
return func(self, *args, **kwargs)

setattr(wrapper, "name", func.__name__)
setattr(wrapper, "configs", validated_config)
setattr(wrapper, "config", validated_config)
setattr(wrapper, "is_activity", True)

return wrapper
Expand Down

0 comments on commit 7bdb00b

Please sign in to comment.