mirror of
https://github.com/open-webui/pipelines
synced 2025-05-30 10:11:26 +00:00
Some type annotation additions
Signed-off-by: Marenz <github@supradigital.org>
This commit is contained in:
parent
3a32c66923
commit
9776bdda0d
@ -12,7 +12,7 @@ from utils.pipelines.main import (
|
||||
)
|
||||
|
||||
# System prompt for function calling
|
||||
DEFAULT_SYSTEM_RPOMPT = (
|
||||
DEFAULT_SYSTEM_PROMPT = (
|
||||
"""Tools: {}
|
||||
|
||||
If a function tool doesn't match the query, return an empty string. Else, pick a
|
||||
@ -50,7 +50,8 @@ class Pipeline:
|
||||
# The identifier must be an alphanumeric string that can include underscores or hyphens. It cannot contain spaces, special characters, slashes, or backslashes.
|
||||
# self.id = "function_calling_blueprint"
|
||||
self.name = "Function Calling Blueprint"
|
||||
self.prompt = prompt or DEFAULT_SYSTEM_RPOMPT
|
||||
self.prompt = prompt or DEFAULT_SYSTEM_PROMPT
|
||||
self.tools: object = None
|
||||
|
||||
# Initialize valves
|
||||
self.valves = self.Valves(
|
||||
|
@ -62,7 +62,7 @@ def pop_system_message(messages: List[dict]) -> Tuple[dict, List[dict]]:
|
||||
return get_system_message(messages), remove_system_message(messages)
|
||||
|
||||
|
||||
def add_or_update_system_message(content: str, messages: List[dict]):
|
||||
def add_or_update_system_message(content: str, messages: List[dict]) -> List[dict]:
|
||||
"""
|
||||
Adds a new system message at the beginning of the messages list
|
||||
or updates the existing system message at the beginning.
|
||||
|
Loading…
Reference in New Issue
Block a user