Skip to content

Commit

Permalink
Some type annotation additions
Browse files Browse the repository at this point in the history
Signed-off-by: Marenz <[email protected]>
  • Loading branch information
Marenz committed Jul 30, 2024
1 parent 3a32c66 commit 9776bdd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions blueprints/function_calling_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
)

# 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
Expand Down Expand Up @@ -50,7 +50,8 @@ def __init__(self, prompt: str | None = None) -> None:
# 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(
Expand Down
2 changes: 1 addition & 1 deletion utils/pipelines/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9776bdd

Please sign in to comment.