Skip to content

Commit

Permalink
Merge pull request #8 from Pingdred/plugin_decorator
Browse files Browse the repository at this point in the history
Update decorator for plugin settings
  • Loading branch information
nicola-corbellini committed Sep 28, 2023
2 parents 85ea31d + 0ecccf3 commit c297bdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions my_plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from cat.mad_hatter.decorators import tool, hook
from cat.mad_hatter.decorators import tool, hook, plugin
from pydantic import BaseModel
from datetime import datetime, date

Expand All @@ -10,8 +10,8 @@ class MySettings(BaseModel):
required_date: date
optional_date: date = 1679616000

@hook
def plugin_settings_schema():
@plugin
def settings_schema():
return MySettings.schema()

@tool
Expand Down

0 comments on commit c297bdc

Please sign in to comment.