Fixed stacking prompt instructions (#5520)
fixed issue with prompt instruction stacking prompt instructions were stacking making the agent eventually return an error because the prompt was full of repeating instructionspull/5521/head
parent
f81b466c9a
commit
f227d5adb1
|
@ -108,10 +108,12 @@ class Agent(
|
|||
def build_prompt(
|
||||
self,
|
||||
*args,
|
||||
extra_messages: list[ChatMessage] = [],
|
||||
extra_messages: [list[ChatMessage]] = None,
|
||||
include_os_info: Optional[bool] = None,
|
||||
**kwargs,
|
||||
) -> ChatPrompt:
|
||||
if extra_messages is None:
|
||||
extra_messages = []
|
||||
# Clock
|
||||
extra_messages.append(
|
||||
ChatMessage.system(f"The current time and date is {time.strftime('%c')}"),
|
||||
|
|
Loading…
Reference in New Issue