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>
This commit is contained in:
gagb 2025-02-19 07:03:54 -08:00 committed by GitHub
parent a0e3a1208c
commit fa3396e9c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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.")