You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a message on a topic for which a corresponding decorator exists (e.g. the on_intent decorator for the topic hermes/intent/<intent_name>) the topic callback is not executed at all.
Example:
@app.on_topic("hermes/intent/myIntent")asyncdeftopic_callback(intent: NluIntent):
# do somethingpass
matches first. In this case the intended callback topic_callback won't be found as it is not included in the _callbacks_intent but only in the _callbacks_topic dictionary.
This can be considered an expected behavior, but is not intuitive nevertheless, imho. Please document this limitation at least.
It would be even better, to change the overall behavior to allow subscribing to arbitrary topics with the on_topic decorator. This would even allow subscriptions for multiple intents as requested in #13 via @app.on_topic("hermes/intent/+"). Some rework of the overall message processing would be required though.
The text was updated successfully, but these errors were encountered:
The callbacks registered by the
on_topic()
decorator are currently processed last.See
rhasspy-hermes-app/rhasspyhermes_app/__init__.py
Line 241 in 3ea35f4
If a message on a topic for which a corresponding decorator exists (e.g. the
on_intent
decorator for the topichermes/intent/<intent_name>
) the topic callback is not executed at all.Example:
The
topic_callback
is never called asrhasspy-hermes-app/rhasspyhermes_app/__init__.py
Line 205 in 3ea35f4
topic_callback
won't be found as it is not included in the_callbacks_intent
but only in the_callbacks_topic
dictionary.This can be considered an expected behavior, but is not intuitive nevertheless, imho. Please document this limitation at least.
It would be even better, to change the overall behavior to allow subscribing to arbitrary topics with the
on_topic
decorator. This would even allow subscriptions for multiple intents as requested in #13 via@app.on_topic("hermes/intent/+")
. Some rework of the overall message processing would be required though.The text was updated successfully, but these errors were encountered: