letta
letta copied to clipboard
Python client: Error while using create_memgpt_autogen_agent_from_config
Describe the bug Trying to run the doc chat example given here: https://github.com/cpacker/MemGPT/blob/main/memgpt/autogen/examples/agent_docs.py
Getting following error: Type mismatch for attribute model_wrapper, cannot cast None to <class 'NoneType'>
AttributeError Traceback (most recent call last)
2 frames /usr/local/lib/python3.10/dist-packages/memgpt/autogen/memgpt_agent.py in create_memgpt_autogen_agent_from_config(name, system_message, is_termination_msg, max_consecutive_auto_reply, human_input_mode, function_map, code_execution_config, llm_config, nonmemgpt_llm_config, default_auto_reply, interface_kwargs, skip_verify, auto_save) 446 raise NotImplementedError 447 --> 448 autogen_memgpt_agent = create_autogen_memgpt_agent( 449 agent_config, 450 default_auto_reply=default_auto_reply,
/usr/local/lib/python3.10/dist-packages/memgpt/autogen/memgpt_agent.py in create_autogen_memgpt_agent(agent_config, skip_verify, auto_save, interface, interface_kwargs, default_auto_reply, is_termination_msg) 346 try: 347 preset = ms.get_preset(preset_name=agent_state.preset, user_id=user_id) --> 348 memgpt_agent = presets.create_agent_from_preset( 349 agent_state=agent_state, 350 preset=preset,
/usr/local/lib/python3.10/dist-packages/memgpt/presets/presets.py in create_agent_from_preset(agent_state, preset, interface, persona_is_file, human_is_file) 80 81 preset_name = agent_state.preset ---> 82 assert preset_name == preset.name, f"AgentState preset '{preset_name}' does not match preset name '{preset.name}'" 83 persona = agent_state.persona 84 human = agent_state.human
AttributeError: 'NoneType' object has no attribute 'name' Please describe your setup
-
[ ] How did you install memgpt?
- %pip install pyautogen
- %pip install pymemgpt
-
[ ] Describe your setup
- Running on colab
- Python version: Python 3.10.12
- memgpt version: 0.3.3
colab Link: https://colab.research.google.com/drive/1QGMrb89sdC6LE5dkkE5FmLno7wNj_EQN?usp=sharing
I downgrade to 0.3.2 and it solved.
Reopening - the autogen version of this bug will be patched in 0.3.5
. Non-autogen bug should be patched in 0.3.4
.