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

Error when setting memgpt flag to true #1

Open
IreGaddr opened this issue Nov 1, 2023 · 3 comments
Open

Error when setting memgpt flag to true #1

IreGaddr opened this issue Nov 1, 2023 · 3 comments

Comments

@IreGaddr
Copy link

IreGaddr commented Nov 1, 2023

When setting USE_MEMGPT = True I get the following error when running your script. All libraries are installed.

(wizard) PS C:\code\LLMs\wizard> & c:/code/LLMs/wizard/Scripts/python.exe c:/code/LLMs/wizard/app.py --tracemalloc

MemGPT Agent at work

User_proxy (to MemGPT_coder):

Write a Function to print Numbers 1 to 10


C:\code\LLMs\wizard\lib\site-packages\memgpt\autogen\memgpt_agent.py:212: RuntimeWarning: coroutine 'AgentAsync.step' was never awaited
(
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Traceback (most recent call last):
File "c:\code\LLMs\wizard\app.py", line 76, in
user_proxy.initiate_chat(
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 531, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 334, in send
recipient.receive(message, self, request_reply, silent)
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 462, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
File "C:\code\LLMs\wizard\lib\site-packages\autogen\agentchat\conversable_agent.py", line 781, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "C:\code\LLMs\wizard\lib\site-packages\memgpt\autogen\memgpt_agent.py", line 212, in _generate_reply_for_user_message
(
TypeError: cannot unpack non-iterable coroutine object

@mertdemir0
Copy link

have same issue here

@MB-Finski
Copy link

Edit the memgpt_aget.py and define the generate_reply_for_user_message method to be async. I.e. "async def generate_reply_for_user_message....".

This will fix this error.

@Dennis-Henriksen
Copy link

Edit the memgpt_aget.py and define the generate_reply_for_user_message method to be async. I.e. "async def generate_reply_for_user_message....".

This will fix this error.

Thank you MB-Finski,

Just to elaborate a bit:

async def _generate_reply_for_user_message(
    self,
    messages: Optional[List[Dict]] = None,
    sender: Optional[Agent] = None,
    config: Optional[Any] = None,
) -> Tuple[bool, Union[str, Dict, None]]:
    self.agent.interface.reset_message_list()

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

4 participants