mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-31 11:54:30 +01:00
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 instructions
This commit is contained in:
@@ -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')}"),
|
||||
|
||||
Reference in New Issue
Block a user