Skip to main content
Pre-release

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

ovos-solver-hivemind-plugin

Exposes a HiveMind connection as an OVOS solver plugin.

A solver plugin is a Q&A backend: given a question, return a spoken answer. This plugin sends the question to a remote HiveMind hub, waits for the hub's speak responses, and returns them as the answer. Any application that uses OVOS solvers can use a HiveMind hub as its answering backend.

Use cases:

Install

pip install ovos-solver-hivemind-plugin

Quickstart

1. Register a client on the HiveMind hub

On the machine running hivemind-core:

hivemind-core add-client
# note the Access Key and Password

2. Set the identity on the client device

hivemind-client set-identity \
  --key <access_key> \
  --password <password> \
  --host <hub_ip> --port 5678 --siteid solver

Verify:

hivemind-client test-identity
# should print: == Identity successfully connected to HiveMind!

3. Use the solver

from ovos_hivemind_solver import HiveMindSolver

solver = HiveMindSolver(config={"autoconnect": True})
print(solver.spoken_answer("what is the speed of light?"))

Or connect manually:

solver = HiveMindSolver()
solver.connect()   # uses the identity file
print(solver.spoken_answer("what is the capital of France?"))

Configuration

Key Type Default Description
autoconnect bool false Connect to HiveMind automatically at construction time.
useragent string "ovos-hivemind-solver" User-agent string sent to the hub.
site_id string value from identity file Site ID for the HiveMind connection.
lang string "en-us" Default language when none is in context.

Connection credentials (host, port, key, password) come from the identity file set with hivemind-client set-identity. They cannot be passed inline.

Using with ovos-persona

Add it as a solver in a persona JSON file:

{
  "name": "HiveMind",
  "solvers": [
    {
      "module": "ovos-solver-hivemind-plugin",
      "ovos-solver-hivemind-plugin": {
        "autoconnect": true
      }
    }
  ]
}

Using with ovos-persona-server

Start ovos-persona-server with a persona that includes this solver. Any OpenAI-compatible client can then query HiveMind via the persona server's REST API.

Documentation

Credits

This work was sponsored by VisioLab, part of Royal Dutch Visio, the research and education center for assistive technology for blind and visually impaired people.

License

Apache 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_hivemind_plugin-0.0.6a2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

ovos_solver_hivemind_plugin-0.0.6a2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file ovos_solver_hivemind_plugin-0.0.6a2.tar.gz.

File metadata

File hashes

Hashes for ovos_solver_hivemind_plugin-0.0.6a2.tar.gz
Algorithm Hash digest
SHA256 605b049b87a84bd8a6f2d36f8990e2caebd4d14cf63bfccb6bf28f6937c2c3f1
MD5 ed64c4defbc500e126273f564d1a6519
BLAKE2b-256 cbb3d52d802d4bd4d61b7c44d4cc84593557e10672beb5998e0611f9bfe20031

See more details on using hashes here.

File details

Details for the file ovos_solver_hivemind_plugin-0.0.6a2-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_solver_hivemind_plugin-0.0.6a2-py3-none-any.whl
Algorithm Hash digest
SHA256 22cdde3ac7e0936a7ca14ae5cb92bec3216f46db123242bbb4f9bfd488137c35
MD5 46bcb586a45bc480ea75e9eca9defd3e
BLAKE2b-256 02155f3e6c58467584b4cf02c5c01125215f5bd75cc4f3cbbe26d1b35ab7b621

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