You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the APIs has been changed, here is the latest version (I believe it works):
importosimportautogenimportmemgpt.autogen.memgpt_agentasmemgpt_autogen#import memgpt.autogen.interface as autogen_interfaceimportmemgpt.agentasagentimportmemgpt.systemassystemimportmemgpt.utilsasutilsimportmemgpt.presets.presetsaspresetsimportmemgpt.constantsasconstantsfrommemgpt.autogen.memgpt_agentimportcreate_memgpt_autogen_agent_from_configBASE_URL='http://0.0.0.0:5000'os.environ['OPENAI_API_HOST'] =BASE_URLos.environ['OPENAI_API_KEY'] ='none'os.environ['OPENAI_API_BASE'] =f"{BASE_URL}/v1"config_list= [
{
"model": "dolphin-2.6-mixtral-8x7b",
"model_endpoint_type":"webui",
#"openai_key":"none", # add this if you use "openai" as "model_endpoint_type""model_endpoint":os.environ['OPENAI_API_HOST'],
"model_wrapper": "dolphin-2.1-mistral-7b"
},
]
llm_config= {"config_list": config_list, "seed": 42}
USE_MEMGPT=True# The user agentuser_proxy=autogen.UserProxyAgent(
name="User_proxy",
system_message="A human admin.",
code_execution_config={"last_n_messages": 2, "work_dir": "groupchat"},
human_input_mode="TERMINATE", # needed?default_auto_reply="You are going to figure all out by your own. ""Work by yourself, the user won't reply until you output `TERMINATE` to end the conversation.",
)
#interface = autogen_interface.AutoGenInterface()persona="I am a 10x engineer, trained in Python. I was the first engineer at Uber."human="Im a team manager at this company"#memgpt_agent=presets.use_preset(presets.DEFAULT_PRESET, model='dolphin-2.6-mixtral-8x7b', persona=persona, human=human, interface=interface, persistence_manager=persistence_manager, agent_config=llm_config)memgpt_agent=create_memgpt_autogen_agent_from_config(
"MemGPT_coder",
llm_config=llm_config,
system_message=f"I am a 10x engineer, trained in Python. I was the first engineer at Uber ",
# interface_kwargs=interface_kwargs,default_auto_reply="...", # Set a default auto-reply message here (non-empty auto-reply is required for LM Studio)
)
ifnotUSE_MEMGPT:
# In the AutoGen example, we create an AssistantAgent to play the role of the codercoder=autogen.AssistantAgent(
name="Coder",
llm_config=llm_config,
system_message=f"I am a 10x engineer, trained in Python. I was the first engineer at Uber",
human_input_mode="TERMINATE",
)
else:
# In our example, we swap this AutoGen agent with a MemGPT agent# This MemGPT agent will have all the benefits of MemGPT, ie persistent memory, etc.print("\nMemGPT Agent at work\n")
coder=memgpt_autogen.MemGPTAgent(
name="MemGPT_coder",
agent=memgpt_agent,
)
# Begin the group chat with a message from the useruser_proxy.initiate_chat(
memgpt_agent,
message="Write a Function to print Numbers 1 to 10"
)
I'm getting an error for another reason I guess with memgpt and mixtral support.
The text was updated successfully, but these errors were encountered:
Some of the APIs has been changed, here is the latest version (I believe it works):
I'm getting an error for another reason I guess with
memgpt
andmixtral
support.The text was updated successfully, but these errors were encountered: