Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix runtime error in AutoGen agent #143

Merged
merged 2 commits into from
Oct 26, 2023
Merged

fix runtime error in AutoGen agent #143

merged 2 commits into from
Oct 26, 2023

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

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants