Skip to content

Conversation

@cpacker
Copy link
Collaborator

@cpacker cpacker commented Oct 26, 2023

Fix #65 (comment)

return asyncio.run(
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/ana/.local/lib/python3.10/site-packages/memgpt/autogen/memgpt_agent.py", line 148, in _a_generate_reply_for_user_message
user_message = new_messages[0]
IndexError: list index out of range

elif len(new_messages) == 1:
user_message = new_messages[0]
else:
return True, None
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is None a safe early exit object to return here?

the expected type AFAIK is a message, eg

{
  "role": "assistant",
  "content": "assistant's message"
}

@cpacker cpacker requested a review from vivi October 26, 2023 22:25
Copy link
Contributor

@vivi vivi left a comment

Choose a reason for hiding this comment

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

lgtm 😼

@vivi vivi merged commit 42f26e1 into main Oct 26, 2023
@cpacker cpacker deleted the autogen-patch branch October 26, 2023 23:04
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
fix runtime error in AutoGen agent
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

Successfully merging this pull request may close these issues.

3 participants