Closed 52cs closed 11 months ago
The error in #252 is coming from the summarizer failing, which happens in step(), not handle_ai_response() https://github.com/cpacker/MemGPT/blob/main/memgpt/agent.py#L676
We just fixed the behavior of the summarizer too, which should fix #252.
hehe
Got it
Let's make a better prompt to solve issue https://github.com/cpacker/MemGPT/issues/252
The original
error_msg
is as following: https://github.com/cpacker/MemGPT/blob/main/memgpt/agent.py#L561-L567Let's enhance the prompt to conduct the llm do the right thing:
Note: The
trim_messages
function tool should be add into function signature.Maybe you still want with and have some experiments to compare them.
summarize_messages_inplace
, hmm, maybe it is better, who knows. Just replaceAlso, maybe you want to move the prompt described above into
system prompt
: Let's say something like this:Whenever you receive a failed function call with exceed maximum context length Error, you should do the following function chain <trim_messages> <recall_memory_search> <{the failed function name}>