Commit Graph

47 Commits (a038a52b55b92fbc7bed3b37da1da0661e0bcbea)

Author SHA1 Message Date
Åke Forslund af50fb5e59 Override make_active for padatious
Padatious doesn't shouldn't report active like other skills, this only
sent an empty skill entry to the active skills list.
2020-03-15 19:23:25 +01:00
Åke 1afedb2dd2
Merge pull request #2468 from JarbasAl/feat/intent_api
intent api
2020-02-24 08:40:36 +01:00
jarbasal 3728e2013b norm utterances 2020-02-24 08:23:35 +01:00
jarbasal d3037f2ba1 move to intent_service_interface 2020-02-24 07:46:46 +01:00
jarbasal 532bcc2b2a intent api 2020-02-24 07:46:46 +01:00
Åke Forslund acf3b96aa2 Make padatious service forward the intent call 2020-02-21 08:26:47 +01:00
andlo 39de6b655e pep8 fix 2020-01-07 16:53:37 +00:00
andlo 7b4891d07a enable seting for patadious single_thread in mycroft.conf 2020-01-06 19:32:29 +00:00
Åke Forslund 13db3d32a3 Handle removing unregistered intents
This small change adds a check that the intent has been registered
before removing it.

If an unregistered intent was removed padatious would silently throw an
exception due to a list operation error. But when run synchronously from
the skill tester this silent exception was actually loud causing skills
to fail to load.
2019-07-26 16:04:16 +02:00
Åke 86df2cefd4 Don't create skill settings for Padatious Service (#2132)
Padatious is registered as a FallbackSkill and was pushing settings to
the backend.

This change allows Padatious to flag to the MycroftSkill class
that no settings should be created. This is done via the new optional
MycroftSkill parameter use_settings.
2019-05-23 10:14:08 -07:00
Åke Forslund 381999d5a8 Minor issues
- padatious sentence defaults
- A bit more explanation about the adapt message utterance
2019-03-28 14:50:50 +01:00
Steve Penrod 342c730a97 Normalize utterances before intent handling
Previously Padatious intent matches were performed on non-normalized text, meaning that things like "what's the weather" wouldn't match a Padatious intent but
"what is the weather" would.

The "utterance" in Adapt intent data will still be non-normalized even if the intent match occurred on a normalized utterance. Retaining the existing behavior.

The "intent_failure" data.  In there, "utterance" is always the raw version, "norm_utt" is the normalized one.

Also added better debugging info for intent matching to the log.

Also addresses a rare issue with the old code where the Adapt context could
have been updated even if the Adapt intent wasn't actually invoked due to
a higher Padatious intent match.
2019-03-28 14:48:26 +01:00
Steve Penrod 41773a039a Adjust and document Padatious loose fallback priority
The loose (conf > 0.5) Padatious match was previously occurring as Fallback
priority 99. The AIML fallback at priority 90 would consume lots of
utterances, interferring with many skills.  Now Padatious runs at priority
89.

Additionally, added documentation of the intent and fallback system, including
guidelines for priorities.
2019-03-21 17:16:07 -05:00
Steve Penrod 230c3057b4 Give Padatious high and low match passes
Padatious was accepting fairly low confidence matches (0.5).  This
would match a phrase such as "Where is the Empire State Building?" to the
intent "Where were you born?"  (Which is a 0.54 match)

Now there are two passes mad on the Padatious fallback.  The first is
looking for high confidence matches (> 0.8).  Then other fallbacks -- such
as the CommonQuery fallbacks -- have an opportunity to consume the
utterance.  If they don't consume it, Padatious is invoked again with
looser confidence before finally invoking the Unknown fallback.
2019-03-05 03:33:02 -06:00
Steve Penrod 286fa6314f Imporove user feedback during startup
Now the eyes go to a khaki color and "< < < LOADING < < <" displays
during the skill startup.  When Padatious finishes the first training
we now emit a "mycroft.ready" on the messagebus.

A change to the skill_mark_1 to look for "mycroft.ready" instead of
"mycroft.skills.initialized" provides a good visual change to show that
it is ready for use.
2019-02-28 14:58:19 -06:00
Steve Penrod d65555c327 Deprecate self.config in skills (#2025)
* Deprecate self.config in skills

Skills should contain their own settings, the self.config concept is being
deprecated.

Also removed the defaults set for several old MycroftAI skills.  The 19.02
version of these Skills initializes the default values using:
```python
self.settings["key"] = default
```

* Update padatious config to work with the config property.
2019-02-28 10:50:08 +01:00
Åke cab63efa5a Support detach_skill in padatious_service (#1846)
The registered intents are now stored in a list. When a detach_skill message is received the list is checked for matching intents and the intents are removed
2018-10-24 10:26:06 -05:00
Steve Penrod 0d64e78d0c Add protection for naive skill authors (#1825)
* Add protection for naive skill authors

It is fairly common for new skill authors to attempt actions in the __init__()
method which are not legal yet, as the Skill has not been fully connected to
the Mycroft system.  This adds an @property protection layer for the two most common
issues:
* Accessing MycroftSkill.bus
* Accessing MycroftSkill.enclosure

Now those are properties instead of variables and provide appropriate warnings
when used before they exist.

Also enhancing the handling of error logs in the CLI to highlight problems such
as this:
* Color "- ERROR -" log messages in red
* Retaining leading characters from log messages, improving readability in formatted messages
2018-10-01 21:41:48 +02:00
Åke 64476eb143 Replace emitter/ws with bus (#1757)
Makes the code a bit more understandable
2018-08-21 20:50:50 -05:00
Steve Penrod 609a09bbf3
Allow Padatious to override Adapt (#1713)
Allow a Padatious intent to override Adapt when it is VERY
certain that the utterance is directed at it.  (95% confidence
or greater.)  Right now that only occurs if the intent match
for the given phrase is perfect.

This solves this kind of issue:
* Adapt:  Matching on "Set" and "Alarm"
* Padatious: Handling "is an alarm set"

* Fix logic error for when no Padatious intent
2018-08-03 14:43:17 -05:00
Matthew D. Scholefield 3fbe12cc07
Make single thread log nicer 2018-07-26 18:57:36 -05:00
Steve Penrod 0eb29718f3 Remove commented-out code 2018-07-26 18:27:49 -05:00
Steve Penrod edc6ab1ed6 Immediately speak warning while Padatious trains
At startup, Padatious was blocking in the fallback while the
training occurred.  As a result, any attempts to use Mycroft
during that period would queue up rather than giving the
user feedback.  Now it immediately returns False, allowing
user notification to occur elsewhere.
2018-07-26 18:21:48 -05:00
Åke Forslund b60320bcae Fix updating padatious intents after intent reload
Training is called from wait_and_train with None as message, this commit adds propper handling for this case.
2018-07-19 14:06:58 +02:00
jarbasal c4cdb85599 padatious enable/disable 2018-07-14 04:00:21 +01:00
Matthew D. Scholefield 85df3adbb0 Remove Padatious version check
No longer necessary now that we notify users when dependencies are out of date
2018-06-12 16:10:26 -05:00
jarbasal 0dee4af24c keep message context 2018-05-23 16:08:22 +02:00
Matthew D. Scholefield 154ccd59d7 Expose single threaded training option from Padatious Service
This is necessary to prevent a deadlock when training during intent tests using pytest
2018-05-14 14:27:37 -05:00
Åke Forslund 0087803d5d Fix trying to make integer from skill-id
skill id's are now the skill path, and can't be made into integers. This issue hinders padatious skills from running.
2018-05-11 10:30:06 -05:00
Matthew D. Scholefield 881687012e Train Padatious on mycroft.skills.initialized (#1455)
Fix sporadic issues from training prematurely.
2018-02-28 21:55:14 -06:00
Matthew D. Scholefield 9d9d615904 Increment Padatious version to 0.3.7 2017-11-02 15:21:47 -05:00
Matthew D. Scholefield 384c66cbd2 Fix active skills for Padatious 2017-11-01 16:55:07 -05:00
Åke Forslund 3e878bd59f Replace ConfigurationManger with Configuration 2017-10-26 19:02:32 -04:00
Matthew D. Scholefield 8dc1dd5ab4 Increment Padatious to 0.3.6
Fixes issue registering entities
2017-10-26 18:59:17 -04:00
Matthew D. Scholefield ef1a6e24c3 Upgrade padatious to fix travis build 2017-10-06 00:06:08 -05:00
Matthew D. Scholefield b6bc4ee482 Increment padatious version number to 0.3.3
This adds a bugfix for empty containers
2017-10-04 21:50:54 -05:00
Matthew D. Scholefield 43a59b0d88 Fix Padatious to load intents and entities
Doesn't make sense to add intents since no sample lines are provided
2017-10-04 21:45:21 -05:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Matthew D. Scholefield 32ac6a83da Fix Padatious parameter 2017-10-03 19:31:37 -05:00
Matthew D. Scholefield 403aeb9360 Upgrade Padatious to 0.3.2 which brings in entity support 2017-10-03 12:17:02 -05:00
Matthew D. Scholefield 5e392f34aa Optimize imports
Remove unused imports and group local vs external alphabetically
2017-09-18 16:07:50 -05:00
Matthew D. Scholefield cfdc405da5 Add new LOG class 2017-09-18 13:56:06 -05:00
Matthew D. Scholefield 9efcc01ce0 Update padatious 2017-09-06 19:22:33 -05:00
Matthew D. Scholefield 7b28e7e61d Make PadatiousService inherit from FallbackSkill to fix new fallback changes 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield e3da4dbcb8 Train on initialization in case no intents are added 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield 3aa52273f4 Add notification when padatious not installed 2017-08-17 16:01:11 -05:00
Matthew D. Scholefield 69d17a373b Create PadatiousService and add padatious to requirements.txt 2017-08-17 16:01:11 -05:00