Skip to main content

A question solver plugin for ovos/neon/mycroft

Project description

AIML Chatbot

Give Mycroft some sass with AIML!

Leverages the Alice chatbot to create some fun interactions. Phrases not explicitly handled by other skills will be run by the chatbot, so nearly every interaction will have some response. But be warned, Mycroft might become a bit obnoxious...

Examples

  • "Do you like ice cream"
  • "Do you like dogs"
  • "I have a jump rope"

Usage

from ovos_solver_aiml_plugin import AIMLChatEngine
from ovos_plugin_manager.templates.agents import AgentMessage, MessageRole

engine = AIMLChatEngine({"lang": "en-us"})
reply = engine.continue_chat([AgentMessage(role=MessageRole.USER, content="hello")])
print(reply.content)
# Hi there!

Language support

The bundled AIML brain is English. Brain files live under ovos_solver_aiml_plugin/aiml_data/<lang>/ (bundled) or ~/.local/share/aiml/<lang>/ (user-supplied).

Opt-in query translation (enable_tx)

Set enable_tx: true in the plugin config to answer non-English queries: the user utterance is translated into the brain language (English), answered, and the answer translated back. This is off by default — a plain install depends on no translate plugin and English deployments pay nothing.

{
  "ovos-solver-aiml-plugin": {
    "lang": "pt-pt",
    "enable_tx": true,
    "translate_plugin": "ovos-translate-plugin-server"
  }
}

The translator is loaded lazily on the first non-English turn. If it cannot be loaded or a translation fails, the plugin degrades gracefully to answering in the original text — it never raises.

Translator plugin note: translation agents tend to be instantiated repeatedly, so a local model-based translate plugin would carry its full model-load cost each time. A remote translate service such as ovos-translate-plugin-server is strongly recommended.

Converter scripts

The bundled aiml_data/<lang>/*.aiml files are the brain. The helper scripts in scripts/ are an optional convenience for authoring/inspecting content in OVOS notation — they are not part of the runtime and not wired into CI:

  • brain_to_locale.py — export the cleanly-mappable subset of an AIML/RiveScript brain to paired .intent / .dialog files ({query} slot for wildcards).
  • locale_to_brain.py — the reverse, regenerating a brain from such files.

The conversion is deliberately partial: entries relying on constructs with no direct OVOS equivalent (<srai>, <condition>, <star>, topic state, …) are skipped, and exports never emit residual <…> markup. See docs/converters.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_solver_aiml_plugin-0.0.2a5.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_solver_aiml_plugin-0.0.2a5-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file ovos_solver_aiml_plugin-0.0.2a5.tar.gz.

File metadata

File hashes

Hashes for ovos_solver_aiml_plugin-0.0.2a5.tar.gz
Algorithm Hash digest
SHA256 701df5b078efdb9d0a7bfc4875ec5b787324474526183efe1641f6ebe426ba77
MD5 91f3a8b8e3176c5f1d37b47c30c68620
BLAKE2b-256 8f269bd45495df96c9befa5eb704e4c7418628d41751d2612fd5e7b75625f6ca

See more details on using hashes here.

File details

Details for the file ovos_solver_aiml_plugin-0.0.2a5-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_solver_aiml_plugin-0.0.2a5-py3-none-any.whl
Algorithm Hash digest
SHA256 f5c2d400078f84e22b7f51102f6268a0b229247f56f8b9b6d17b194b98c3dbbf
MD5 72fa76c29e4ad35e88873037ddb67eb5
BLAKE2b-256 4b2859e8373a69a23bbd3495f1ab1bc6f866dca9886f57378a5f7023b08b1fb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page