MobileAgent icon indicating copy to clipboard operation
MobileAgent copied to clipboard

Memory issue

Open yfcht opened this issue 1 year ago • 1 comments

Is there any problem with the memory part? The variable insight here seems to be an empty string all the time. What is the purpose of this variable?

if memory_switch:
    prompt_memory = get_memory_prompt(insight)
    chat_action = add_response("user", prompt_memory, chat_action)
    output_memory = inference_chat(chat_action, 'gpt-4o', API_url, token)
    chat_action = add_response("assistant", output_memory, chat_action)
    status = "#" * 50 + " Memory " + "#" * 50
    print(status)
    print(output_memory)
    print('#' * len(status))
    output_memory = output_memory.split("### Important content ###")[-1].split("\n\n")[0].strip() + "\n"
    if "None" not in output_memory and output_memory not in memory:
        memory += output_memory

yfcht avatar Jul 26 '24 06:07 yfcht

If your task does not require remembering task-related content, the agent will not add anything to the memory unit. This has the benefit of reducing the interference of irrelevant information.

junyangwang0410 avatar Jul 27 '24 04:07 junyangwang0410