diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a0eccc6d..f923ace423 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Chat.output_fn`'s now takes an optional kwarg parameter, `stream`. - Implemented `SerializableMixin` in `Structure`, `BaseTask`, `BaseTool`, and `TaskMemory` - `@activity` decorated functions can now accept kwargs that are defined in the activity schema. +- `EventListener.event_types` will now listen on child types of any provided type. ### Fixed diff --git a/docs/griptape-framework/misc/src/events_3.py b/docs/griptape-framework/misc/src/events_3.py index c6f7959898..62501b8d67 100644 --- a/docs/griptape-framework/misc/src/events_3.py +++ b/docs/griptape-framework/misc/src/events_3.py @@ -9,7 +9,7 @@ def action_chunk_listener(event: ActionChunkEvent) -> None: if event.tag is not None and event.name is not None and event.path is not None: print(f"{event.name}.{event.tag} ({event.path}) ", end="", flush=True) if event.partial_input is not None: - print(event.partial_input) + print(event.partial_input, end="", flush=True) EventBus.add_event_listeners( diff --git a/griptape/utils/stream.py b/griptape/utils/stream.py index 967d679906..f722db33d6 100644 --- a/griptape/utils/stream.py +++ b/griptape/utils/stream.py @@ -68,7 +68,7 @@ def run(self, *args) -> Iterator[TextArtifact]: yield TextArtifact(value=event.token) elif isinstance(event, ActionChunkEvent): if event.tag is not None and event.name is not None and event.path is not None: - yield TextArtifact(f"{event.name}.{event.tag}({event.path})") + yield TextArtifact(f"{event.name}.{event.tag} ({event.path})") if event.partial_input is not None: action_str += event.partial_input try: