Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
827dd1b0
Commit
827dd1b0
authored
Jun 11, 2024
by
Timothy J. Baek
Browse files
refac
parent
b2028d18
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/lib/components/workspace/Tools/CodeEditor.svelte
src/lib/components/workspace/Tools/CodeEditor.svelte
+7
-3
No files found.
src/lib/components/workspace/Tools/CodeEditor.svelte
View file @
827dd1b0
...
@@ -36,13 +36,17 @@ class Tools:
...
@@ -36,13 +36,17 @@ class Tools:
def get_current_time(self) -> str:
def get_current_time(self) -> str:
"""
"""
Get the current time.
Get the current time
in a more human-readable format
.
:return: The current time.
:return: The current time.
"""
"""
now = datetime.now()
now = datetime.now()
current_time = now.strftime("%H:%M:%S")
current_time = now.strftime("%I:%M:%S %p") # Using 12-hour format with AM/PM
return f"Current Time = {current_time}"
current_date = now.strftime(
"%A, %B %d, %Y"
) # Full weekday, month name, day, and year
return f"Current Date and Time = {current_date}, {current_time}"
def calculator(self, equation: str) -> str:
def calculator(self, equation: str) -> str:
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment