Browse Source

Initialize BaseGroupChat before reset (#5608)

Fixes #5366 

Solution: Instead of raising an error called `_init()`

---------

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
tags/python-v0.4.8
gagb GitHub 1 year ago
parent
commit
fa3396e9c3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py

+ 1
- 1
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py View File

@@ -494,7 +494,7 @@ class BaseGroupChat(Team, ABC, ComponentBase[BaseModel]):
""" """


if not self._initialized: if not self._initialized:
raise RuntimeError("The group chat has not been initialized. It must be run before it can be reset.")
await self._init(self._runtime)


if self._is_running: if self._is_running:
raise RuntimeError("The group chat is currently running. It must be stopped before it can be reset.") raise RuntimeError("The group chat is currently running. It must be stopped before it can be reset.")


Loading…
Cancel
Save