Skip to content

Commit

Permalink
fix:handle old padacioso versions
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 10, 2024
1 parent 182dfc3 commit c4a5adb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ovos_core/intent_services/padacioso_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ def __init__(self, bus, config):
self.conf_low = self.padacioso_config.get("conf_low") or 0.5
self.workers = self.padacioso_config.get("workers") or 4

self.containers = {lang: FallbackIntentContainer(
self.padacioso_config.get("fuzz"), n_workers=self.workers)
for lang in langs}
try:
self.containers = {
lang: FallbackIntentContainer(self.padacioso_config.get("fuzz"),
n_workers=self.workers)
for lang in langs}
except TypeError: # old padacioso version without n_workers kwarg
self.containers = {
lang: FallbackIntentContainer(self.padacioso_config.get("fuzz"))
for lang in langs}

self.bus.on('padatious:register_intent', self.register_intent)
self.bus.on('padatious:register_entity', self.register_entity)
Expand Down

0 comments on commit c4a5adb

Please sign in to comment.