-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
244 additions
and
77 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
prediction_market_agent/agents/microchain_agent/common_functions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from microchain import Function | ||
from prediction_market_agent_tooling.tools.utils import utcnow | ||
|
||
|
||
class TodayDate(Function): | ||
@property | ||
def description(self) -> str: | ||
return "Use this function to get the current date." | ||
|
||
@property | ||
def example_args(self) -> list[str]: | ||
return [] | ||
|
||
def __call__(self) -> str: | ||
now = utcnow() | ||
return f"Today is {now.strftime('%Y-%m-%d %H:%M:%S')}. The day is {now.strftime('%A')}." | ||
|
||
|
||
COMMON_FUNCTIONS: list[type[Function]] = [ | ||
TodayDate, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.