Metadata-Version: 2.4
Name: ovos_solver_failure_plugin
Version: 0.0.6a2
Summary: A question solver plugin for ovos/neon/mycroft
Author-email: JarbasAi <jarbasai@mailfence.com>
License: MIT
Project-URL: Homepage, https://github.com/OpenVoiceOS/ovos-solver-failure-plugin
Keywords: ovos,plugin,utterance,fallback,query
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.1.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# <img src='https://raw.githack.com/FortAwesome/Font-Awesome/master/svgs/solid/robot.svg' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/> FailureSolver

FailureSolver is a question solver plugin for OVOS, Neon, and Mycroft assistants. It never answers a query. It always returns a fallback message, so it works as the last solver in a chain when every other solver fails.

## Install

```bash
pip install ovos-solver-failure-plugin
```

## Usage

```python
from ovos_solver_failure_plugin import FailureSolver

d = FailureSolver()
sentence = d.spoken_answer("hello")
print(sentence)
# 404 brain not found
```

The plugin ships fallback dialogs for `en-US`, `da-DK`, `fr-FR`, and `sv-SE`. Pass a `lang` code to `spoken_answer` to pick one:

```python
sentence = d.spoken_answer("hello", lang="fr-FR")
```

If no dialog exists for the requested language, the plugin returns `404`.

## Related projects

- [OpenVoiceOS/ovos-persona](https://github.com/OpenVoiceOS/ovos-persona): chains question solvers, including this fallback, to answer user queries.
- [OpenVoiceOS/ovos-solver-BM25-plugin](https://github.com/OpenVoiceOS/ovos-solver-BM25-plugin): a sibling question solver plugin.
- [OpenVoiceOS/ovos-ddg-solver-plugin](https://github.com/OpenVoiceOS/ovos-ddg-solver-plugin): a sibling question solver plugin backed by DuckDuckGo.

## License

MIT
