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

fix: Fixed NameError: name 'attach' is not defined #1255

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

taddeusb90
Copy link
Contributor

@taddeusb90 taddeusb90 commented Apr 14, 2024

Fixes attaching memory in scripts
#1254

# then pass the config to the constructor
software_engineering_expert = create_memgpt_autogen_agent_from_config(
    "Chad - Software Engineering Lead",
    llm_config=llm_config_memgpt,
    system_message=f"Chad, you are a seasoned software engineering lead with extensive experience in managing complex projects. Your role is to oversee the quality of software development, ensuring that all implementations meet high standards. Challenge incomplete information and push for optimal solutions. Engage with other agents to enhance the software features based on engineering best practices. If unsure, admit it freely, but always aim to provide valuable feedback and direction.",
    interface_kwargs=interface_kwargs,
    skip_verify=False,  # NOTE: you should set this to True if you expect your MemGPT AutoGen agent to call a function other than send_message on the first turn
    auto_save=True, 
    is_termination_msg=lambda x: x.get("content", "") and x.get("content", "").rstrip().endswith("TERMINATE"),
    default_auto_reply="Reply 'TERMINATE' in the end when everything is done. "
)

software_engineering_expert.attach("software_engineering")

@taddeusb90 taddeusb90 changed the title Fixed NameError: name 'attach' is not defined fix: Fixed NameError: name 'attach' is not defined Apr 14, 2024
Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! We should migrate autogen scripts to run on top of the MemGPT client instead of accessing internal functions directly.

@taddeusb90
Copy link
Contributor Author

taddeusb90 commented Apr 14, 2024

lgtm! We should migrate autogen scripts to run on top of the MemGPT client instead of accessing internal functions directly.

@sarahwooders, can you merge it? I don't have permission. Thanks!

@sarahwooders
Copy link
Collaborator

@taddeusb90 sorry could you also fix the formatting errors? You can run

pip install poetry 
poetry install -E dev 
poetry run black . -l 140

@sarahwooders sarahwooders linked an issue Apr 15, 2024 that may be closed by this pull request
@taddeusb90
Copy link
Contributor Author

@sarahwooders done 😄

@sarahwooders sarahwooders merged commit 29e9db9 into cpacker:main Apr 16, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

NameError: name 'attach' is not defined
2 participants