Some type annotation additions

Signed-off-by: Marenz <github@supradigital.org>
This commit is contained in:
Marenz 2024-07-18 17:53:47 +02:00 committed by Mathias L. Baumann
parent 3a32c66923
commit 9776bdda0d
No known key found for this signature in database
GPG Key ID: 12FDE31331707ED6
2 changed files with 4 additions and 3 deletions

View File

@ -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(

View File

@ -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.