mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
Update ArchBaseHandler
This commit is contained in:
parent
2fd8a5a06d
commit
79eafc0241
1 changed files with 4 additions and 4 deletions
|
|
@ -106,7 +106,7 @@ class ArchBaseHandler:
|
||||||
self,
|
self,
|
||||||
messages: List[Message],
|
messages: List[Message],
|
||||||
tools: List[Dict[str, Any]] = None,
|
tools: List[Dict[str, Any]] = None,
|
||||||
extra_instructions: str = None,
|
extra_instruction: str = None,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Processes a list of messages and formats them appropriately.
|
Processes a list of messages and formats them appropriately.
|
||||||
|
|
@ -114,7 +114,7 @@ class ArchBaseHandler:
|
||||||
Args:
|
Args:
|
||||||
messages (List[Message]): A list of message objects.
|
messages (List[Message]): A list of message objects.
|
||||||
tools (List[Dict[str, Any]], optional): A list of tools to include in the system prompt.
|
tools (List[Dict[str, Any]], optional): A list of tools to include in the system prompt.
|
||||||
extra_instructions (str, optional): Additional instructions to append to the last user message.
|
extra_instruction (str, optional): Additional instructions to append to the last user message.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List[Dict[str, Any]]: A list of processed message dictionaries.
|
List[Dict[str, Any]]: A list of processed message dictionaries.
|
||||||
|
|
@ -148,8 +148,8 @@ class ArchBaseHandler:
|
||||||
|
|
||||||
assert processed_messages[-1]["role"] == "user"
|
assert processed_messages[-1]["role"] == "user"
|
||||||
|
|
||||||
if extra_instructions:
|
if extra_instruction:
|
||||||
processed_messages[-1]["content"] += extra_instructions
|
processed_messages[-1]["content"] += extra_instruction
|
||||||
|
|
||||||
return processed_messages
|
return processed_messages
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue