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

[BUG] NameError in GroupChat Initialization Due to Missing GroupChatLog Class #629

Open
ggiallo28 opened this issue Nov 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ggiallo28
Copy link

ggiallo28 commented Nov 11, 2024

Describe the bug
When attempting to initialize a GroupChat instance in the swarms library, a NameError occurs due to an undefined GroupChatLog class. This error blocks the successful creation of the GroupChat object, as it is referenced within the code but is missing from the definition or imports.

To Reproduce
Steps to reproduce:

  1. Import the GroupChat class from the swarms.structs.groupchat module.
  2. Attempt to create a GroupChat instance in a Python script.
  3. Run the script.
  4. Observe the NameError related to GroupChatLog.

Expected behavior
The GroupChat instance should initialize properly, and logging functionality should work if GroupChatLog is intended to manage chat logs. If GroupChatLog is necessary, it should be properly defined or imported.

Error Output
The following error message is displayed:

Traceback (most recent call last):
  File "main.py", line 59, in <module>
    group_chat = GroupChat(
                 ^^^^^^^^^^
  File "groupchat.py", line 89, in __init__
    self.group_log = GroupChatLog(
                     ^^^^^^^^^^^^
NameError: name 'GroupChatLog' is not defined. Did you mean: 'GroupChat'?

Additional context
This issue suggests that GroupChatLog may be missing or incorrectly referenced in the code. If it is meant to manage chat logs, an update to the library might be required to define or import GroupChatLog properly. As a temporary workaround, defining a basic GroupChatLog class can prevent the error, though logging functionality may be limited.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@ggiallo28 ggiallo28 added the bug Something isn't working label Nov 11, 2024
Copy link

Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.

@onyedikachi-david
Copy link

Hello @kyegomez, Can i contribute to this?

@kyegomez
Copy link
Owner

kyegomez commented Nov 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants