mirror of
https://github.com/open-webui/pipelines
synced 2025-05-11 16:10:45 +00:00
enh: current time fc
This commit is contained in:
parent
a248b96dba
commit
871348049f
@ -1,6 +1,9 @@
|
||||
import os
|
||||
import requests
|
||||
from typing import Literal, List, Optional
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
from blueprints.function_calling_blueprint import Pipeline as FunctionCallingBlueprint
|
||||
|
||||
|
||||
@ -14,6 +17,19 @@ class Pipeline(FunctionCallingBlueprint):
|
||||
def __init__(self, pipeline) -> None:
|
||||
self.pipeline = pipeline
|
||||
|
||||
def get_current_time(
|
||||
self,
|
||||
) -> str:
|
||||
"""
|
||||
Get the current time.
|
||||
|
||||
:return: The current time.
|
||||
"""
|
||||
|
||||
now = datetime.now()
|
||||
current_time = now.strftime("%H:%M:%S")
|
||||
return f"Current Time = {current_time}"
|
||||
|
||||
def get_current_weather(
|
||||
self,
|
||||
location: str,
|
||||
|
Loading…
Reference in New Issue
Block a user