-
-
Save mberman84/c95d69263d9c2ceb7d56cf336f13ae02 to your computer and use it in GitHub Desktop.
import os | |
import autogen | |
import memgpt.autogen.memgpt_agent as memgpt_autogen | |
import memgpt.autogen.interface as autogen_interface | |
import memgpt.agent as agent | |
import memgpt.system as system | |
import memgpt.utils as utils | |
import memgpt.presets as presets | |
import memgpt.constants as constants | |
import memgpt.personas.personas as personas | |
import memgpt.humans.humans as humans | |
from memgpt.persistence_manager import InMemoryStateManager, InMemoryStateManagerWithPreloadedArchivalMemory, InMemoryStateManagerWithFaiss | |
import openai | |
openai.api_key = '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' | |
config_list = [ | |
{ | |
'model': 'gpt-4' | |
}, | |
] | |
llm_config = {"config_list": config_list, "seed": 42} | |
user_proxy = autogen.UserProxyAgent( | |
name="User_proxy", | |
system_message="A human admin.", | |
code_execution_config={"last_n_messages": 2, "work_dir": "groupchat"}, | |
) | |
interface = autogen_interface.AutoGenInterface() # how MemGPT talks to AutoGen | |
persistence_manager = InMemoryStateManager() | |
persona = "I\'m a 10x engineer at a FAANG tech company." | |
human = "I\'m a team manager at a FAANG tech company." | |
memgpt_agent = presets.use_preset(presets.DEFAULT, 'gpt-4', persona, human, interface, persistence_manager) | |
# MemGPT coder | |
coder = memgpt_autogen.MemGPTAgent( | |
name="MemGPT_coder", | |
agent=memgpt_agent, | |
) | |
# non-MemGPT PM | |
pm = autogen.AssistantAgent( | |
name="Product_manager", | |
system_message="Creative in software product ideas.", | |
llm_config=llm_config, | |
) | |
groupchat = autogen.GroupChat(agents=[user_proxy, coder, pm], messages=[], max_round=12) | |
manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config) | |
user_proxy.initiate_chat(manager, message="First send the message 'Let's go Mario!'") |
ok im on windows and no matter how i try to install this using pymemgpt pyautogen or memgpt autogen it doesnt get rid if the lines saying they aint installed
Same here.
On a Mac, Conda environment, installed everything but still get a squiggly line under:
import memgpt.personas.personas as personas
import memgpt.humans.humans as humans
ok im on windows and no matter how i try to install this using pymemgpt pyautogen or memgpt autogen it doesnt get rid if the lines saying they aint installed
Same here. On a Mac, Conda environment, installed everything but still get a squiggly line under: import memgpt.personas.personas as personas import memgpt.humans.humans as humans
I got same error
@mberman84
hey mberman84 do you have a new gist that you could share or a repo with a fix?
Also problems with:
import memgpt.personas.personas as personas
import memgpt.humans.humans as humans
ModuleNotFoundError: No module named 'memgpt.personas.personas'
how do i solve it
Also problems with: import memgpt.personas.personas as personas import memgpt.humans.humans as humans
Also had this, fixed it. If you slow down the video to 0.25x speed, you can see he installs MemGPT 0.1.3 and AutoGen 0.1.13 at the 2:24 timestamp.
I'm running in a virtual environment on Windows. My commands:
pip uninstall pyautogen
pip uninstall pymemgpt
pip install pyautogen==0.1.13
pip install pymemgpt==0.1.3
Successfully ran original gist.
These things are changing and evolving so quickly, it might be a good idea to mention or post versions in future tutorials. Grateful for all the videos just the same.
EDIT: When I back to play the video, it was still 0.25x speed, highly recommend.
Also problems with: import memgpt.personas.personas as personas import memgpt.humans.humans as humans
Also had this, fixed it. If you slow down the video to 0.25x speed, you can see he installs MemGPT 0.1.3 and AutoGen 0.1.13 at the 2:24 timestamp. I'm running in a virtual environment on Windows. My commands:
pip uninstall pyautogen
pip uninstall pymemgpt
pip install pyautogen==0.1.13
pip install pymemgpt==0.1.3
Successfully ran original gist.
These things are changing and evolving so quickly, it might be a good idea to mention or post versions in future tutorials. Grateful for all the videos just the same.
EDIT: When I back to play the video, it was still 0.25x speed, highly recommend.
Omg this works, thank you !!
I am getting the output till here and there is no proceeding of the agent ahead.
User_proxy (to chat_manager):
First send the message 'Let's go Mario!'
MemGPT_coder (to chat_manager):
💭 Executing the requested action, sending the message 'Let's go Mario!' as instructed by the user.
🤖 Let's go Mario!
⚡🟢 [function] Success: None
Provide feedback to chat_manager. Press enter to skip and use auto-reply, or type 'exit' to end the conversation:
That's Works Thanks
Can anyone provide complete code, with requirements.txt file, to run this in AutoGen 2 (0.2)?
thanks!
ok im on windows and no matter how i try to install this using pymemgpt pyautogen or memgpt autogen it doesnt get rid if the lines saying they aint installed