Skip to content

Commit

Permalink
stopping LLM before removing from created items
Browse files Browse the repository at this point in the history
  • Loading branch information
kirgrim committed Mar 30, 2024
1 parent 73e9f8a commit 9d4bdee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions neon_llm_core/utils/personas/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,9 @@ def clean_up_personas(self, ignore_items: List[PersonaModel] = None):
ignored_persona_ids = set(persona.id for persona in ignore_items or [])
personas_to_remove = connected_personas - ignored_persona_ids
for persona_id in personas_to_remove:
LOG.info(f'Removing persona_id = {persona_id}')
self._created_items.pop(persona_id, None)
self.remove_persona(persona_id=persona_id)

def remove_persona(self, persona_id: str):
LOG.info(f'Removing persona_id = {persona_id}')
self._created_items[persona_id].stop()
self._created_items.pop(persona_id, None)

0 comments on commit 9d4bdee

Please sign in to comment.