mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 15:43:54 +00:00
experimental[patch]: remove \n from AutoGPT feedback_tool exit check (#20132)
This commit is contained in:
parent
fd1061e7bf
commit
63a07f52df
@ -133,11 +133,11 @@ class AutoGPT:
|
|||||||
f"Assistant Reply: {assistant_reply} " f"\nResult: {result} "
|
f"Assistant Reply: {assistant_reply} " f"\nResult: {result} "
|
||||||
)
|
)
|
||||||
if self.feedback_tool is not None:
|
if self.feedback_tool is not None:
|
||||||
feedback = f"\n{self.feedback_tool.run('Input: ')}"
|
feedback = f"{self.feedback_tool.run('Input: ')}"
|
||||||
if feedback in {"q", "stop"}:
|
if feedback in {"q", "stop"}:
|
||||||
print("EXITING") # noqa: T201
|
print("EXITING") # noqa: T201
|
||||||
return "EXITING"
|
return "EXITING"
|
||||||
memory_to_add += feedback
|
memory_to_add += f"\n{feedback}"
|
||||||
|
|
||||||
self.memory.add_documents([Document(page_content=memory_to_add)])
|
self.memory.add_documents([Document(page_content=memory_to_add)])
|
||||||
self.chat_history_memory.add_message(SystemMessage(content=result))
|
self.chat_history_memory.add_message(SystemMessage(content=result))
|
||||||
|
Loading…
Reference in New Issue
Block a user