Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory issue #35

Open
yfcht opened this issue Jul 26, 2024 · 1 comment
Open

Memory issue #35

yfcht opened this issue Jul 26, 2024 · 1 comment

Comments

@yfcht
Copy link

yfcht commented Jul 26, 2024

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
@junyangwang0410
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants