mirror of
https://github.com/open-webui/pipelines
synced 2025-05-11 08:01:08 +00:00
28 lines
870 B
Python
28 lines
870 B
Python
from blueprints.function_calling_blueprint import Pipeline as FunctionCallingBlueprint
|
|
|
|
|
|
class Pipeline(FunctionCallingBlueprint):
|
|
class Valves(FunctionCallingBlueprint.Valves):
|
|
# Add your custom parameters here
|
|
pass
|
|
|
|
class Tools:
|
|
def __init__(self, pipeline) -> None:
|
|
self.pipeline = pipeline
|
|
|
|
# Add your custom tools using pure Python code here, make sure to add type hints
|
|
# Please refer to function_calling_filter_pipeline.py for an example
|
|
pass
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.id = "my_tools_pipeline"
|
|
self.name = "My Tools Pipeline"
|
|
self.valves = self.Valves(
|
|
**{
|
|
**self.valves.model_dump(),
|
|
"pipelines": ["*"], # Connect to all pipelines
|
|
},
|
|
)
|
|
self.tools = self.Tools(self)
|