mirror of
https://github.com/open-webui/pipelines
synced 2025-06-23 02:05:38 +00:00
example: fc scaffold
This commit is contained in:
parent
313f1a7592
commit
74e5c067e5
28
examples/function_calling_scaffold.py
Normal file
28
examples/function_calling_scaffold.py
Normal file
@ -0,0 +1,28 @@
|
||||
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 here
|
||||
# Please refer to function_calling_filter_pipeline.py for an example
|
||||
# Pure Python code can be added here
|
||||
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)
|
Loading…
Reference in New Issue
Block a user