patch[experimental] Fix prompt in GenerativeAgentMemory (#24771)

There is an issue with the prompt format in `GenerativeAgentMemory` ,
try to fix it.
The prompt is same as the one in method `_score_memory_importance`.
This commit is contained in:
ZhangShenao 2024-07-29 19:02:31 +08:00 committed by GitHub
parent 2ba8393182
commit 4a05679fdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -144,7 +144,7 @@ class GenerativeAgentMemory(BaseMemory):
+ " following piece of memory. Always answer with only a list of numbers." + " following piece of memory. Always answer with only a list of numbers."
+ " If just given one memory still respond in a list." + " If just given one memory still respond in a list."
+ " Memories are separated by semi colans (;)" + " Memories are separated by semi colans (;)"
+ "\Memories: {memory_content}" + "\nMemories: {memory_content}"
+ "\nRating: " + "\nRating: "
) )
scores = self.chain(prompt).run(memory_content=memory_content).strip() scores = self.chain(prompt).run(memory_content=memory_content).strip()