You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/backend/kernel_tools/hr_tools.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,27 @@
6
6
importjson
7
7
fromtypingimportget_type_hints
8
8
fromutils_dateimportformat_date_for_user
9
+
fromapp_configimportconfig
9
10
10
11
11
12
classHrTools:
12
13
# Define HR tools (functions)
13
-
formatting_instructions="Instructions: returning the output of this function call verbatim to the user in markdown. Then write AGENT SUMMARY: and then include a summary of what you did."
formatting_instructions="Instructions: returning the output of this function call verbatim to the user in markdown. Then write AGENT SUMMARY: and then include a summary of what you did. Convert all date strings in the following text to short date format with 3-letter month (MMM) in the {selecetd_language} locale (e.g., en-US, en-IN), remove time, and replace original dates with the formatted ones"
14
16
agent_name=AgentType.HR.value
15
17
16
18
@staticmethod
17
19
@kernel_function(description="Schedule an orientation session for a new employee.")
f"Formatted date for user ######################### : {formatted_date} using locale: {lang},browser lang {config.get_user_local_browser_language()}, locale: {babel_locale}"
113
+
)
114
+
returnformatted_date
115
+
22
116
exceptExceptionase:
23
-
logging.warning(f"Date formatting failed for '{date_str}': {e}")
24
-
returndate_str
117
+
logging.error("Error formatting date '%s': %s", date_str, str(e))
118
+
# Return the original input if anything goes wrong
0 commit comments