Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AIML Chatbot

An OVOS question solver plugin that answers with an AIML chatbot. It uses the Alice chatbot brain to hold open-ended conversation. It answers utterances that no other skill or solver handles, so most utterances get some response.

Examples

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

Install

pip install ovos-solver-aiml-plugin

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 plugin translates the user utterance into the brain language (English), answers it, then translates the answer back.

This is off by default, so a plain install needs no translate plugin and English deployments pay no extra cost.

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

The plugin loads the translator lazily, on the first non-English turn. If the translator fails to load, or a translation fails, the plugin answers in the original text instead of raising an error.

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

Converter scripts

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

  • brain_to_locale.py: exports the cleanly-mappable subset of an AIML or RiveScript brain to paired .intent / .dialog files ({query} slot for wildcards).
  • locale_to_brain.py: the reverse. It regenerates a brain from such files.

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

Related projects

License

Apache License 2.0

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.2a6.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.2a6-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ovos_solver_aiml_plugin-0.0.2a6.tar.gz
Algorithm Hash digest
SHA256 a3a47b46ebb87a40704c6d3fb3bce62c9b7d0f19da2f0aa6607bbe422af24cb2
MD5 202c597a5cadf64f0e2173357b756a0e
BLAKE2b-256 9cfc33109fefb164a1bba101e7c269c716c99455d2ba86141020ec67ef1c0534

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ovos_solver_aiml_plugin-0.0.2a6-py3-none-any.whl
Algorithm Hash digest
SHA256 8f4f0980b4cf9b8d2ba33f5ce32c7cae5c7c5338157a19c12b0619af593c14f8
MD5 beaaeb238926397be5dc84700c81ba7c
BLAKE2b-256 0c47d6e2ba79de70c595e15f694330f02e5ff0c9cdbc22a0082036c4facfa159

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 Sentry Error logging StatusPage Status page