ovos-solver-hivemind-plugin


Nameovos-solver-hivemind-plugin JSON
Version 0.0.0a8 PyPI version JSON
download
home_pagehttps://github.com/JarbasHiveMind/ovos-solver-hivemind-plugin
SummaryA question solver plugin for OVOS
upload_time2024-05-28 06:13:08
maintainerNone
docs_urlNone
authorjarbasai
requires_pythonNone
licenseMIT
keywords ovos openvoiceos plugin utterance fallback query
VCS
bugtrack_url
requirements ovos-plugin-manager ovos-translate-server-plugin hivemind_bus_client
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HiveMind solver

exposes a hivemind connection as a solver plugin

use cases:
- allow your apps to get responses from a remote HiveMind
- expose HiveMind to any OpenAI compatible UI, via [ovos-persona-server](https://github.com/OpenVoiceOS/ovos-persona-server)
- Integrate HiveMind/OVOS into a [MOS (Mixture Of Solvers)](https://github.com/TigreGotico/ovos-MoS)

## Install

`pip install ovos-solver-hivemind-plugin`

## Setup

You need to register the solver in the HiveMind server
```bash
$ hivemind-core add-client
Credentials added to database!

Node ID: 2
Friendly Name: HiveMind-Node-2
Access Key: 5a9e580a2773a262cbb23fe9759881ff
Password: 9b247ca66c7cd2b6388ad49ca504279d
Encryption Key: 4185240103de0770
WARNING: Encryption Key is deprecated, only use if your client does not support password
```

And then set the identity file in the satellite device (where the solver will run)
```bash
$ hivemind-client set-identity --key 5a9e580a2773a262cbb23fe9759881ff --password 9b247ca66c7cd2b6388ad49ca504279d --host 0.0.0.0 --port 5678 --siteid test
identity saved: /home/miro/.config/hivemind/_identity.json
```

check the created identity file if you like
```bash
$ cat ~/.config/hivemind/_identity.json
{
    "password": "9b247ca66c7cd2b6388ad49ca504279d",
    "access_key": "5a9e580a2773a262cbb23fe9759881ff",
    "site_id": "test",
    "default_port": 5678,
    "default_master": "ws://0.0.0.0"
}
```

test that a connection is possible using the identity file
```bash
$ hivemind-client test-identity
(...)
2024-05-20 21:22:28.003 - OVOS - hivemind_bus_client.client:__init__:112 - INFO - Session ID: 34d75c93-4e65-4ea9-b5f4-87169dcfda01
(...)
== Identity successfully connected to HiveMind!
```

## Usage

For usage with any solver framework, such as persona, use `"ovos-solver-hivemind-plugin"` for the solver id

Standalone usage

```python
from ovos_hivemind_solver import HiveMindSolver

bot = HiveMindSolver()
bot.connect()  # connection info from identity file
print(bot.spoken_answer("what is the speed of light?"))
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JarbasHiveMind/ovos-solver-hivemind-plugin",
    "name": "ovos-solver-hivemind-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "OVOS openvoiceos plugin utterance fallback query",
    "author": "jarbasai",
    "author_email": "jarbasai@mailfence.com",
    "download_url": null,
    "platform": null,
    "description": "# HiveMind solver\n\nexposes a hivemind connection as a solver plugin\n\nuse cases:\n- allow your apps to get responses from a remote HiveMind\n- expose HiveMind to any OpenAI compatible UI, via [ovos-persona-server](https://github.com/OpenVoiceOS/ovos-persona-server)\n- Integrate HiveMind/OVOS into a [MOS (Mixture Of Solvers)](https://github.com/TigreGotico/ovos-MoS)\n\n## Install\n\n`pip install ovos-solver-hivemind-plugin`\n\n## Setup\n\nYou need to register the solver in the HiveMind server\n```bash\n$ hivemind-core add-client\nCredentials added to database!\n\nNode ID: 2\nFriendly Name: HiveMind-Node-2\nAccess Key: 5a9e580a2773a262cbb23fe9759881ff\nPassword: 9b247ca66c7cd2b6388ad49ca504279d\nEncryption Key: 4185240103de0770\nWARNING: Encryption Key is deprecated, only use if your client does not support password\n```\n\nAnd then set the identity file in the satellite device (where the solver will run)\n```bash\n$ hivemind-client set-identity --key 5a9e580a2773a262cbb23fe9759881ff --password 9b247ca66c7cd2b6388ad49ca504279d --host 0.0.0.0 --port 5678 --siteid test\nidentity saved: /home/miro/.config/hivemind/_identity.json\n```\n\ncheck the created identity file if you like\n```bash\n$ cat ~/.config/hivemind/_identity.json\n{\n    \"password\": \"9b247ca66c7cd2b6388ad49ca504279d\",\n    \"access_key\": \"5a9e580a2773a262cbb23fe9759881ff\",\n    \"site_id\": \"test\",\n    \"default_port\": 5678,\n    \"default_master\": \"ws://0.0.0.0\"\n}\n```\n\ntest that a connection is possible using the identity file\n```bash\n$ hivemind-client test-identity\n(...)\n2024-05-20 21:22:28.003 - OVOS - hivemind_bus_client.client:__init__:112 - INFO - Session ID: 34d75c93-4e65-4ea9-b5f4-87169dcfda01\n(...)\n== Identity successfully connected to HiveMind!\n```\n\n## Usage\n\nFor usage with any solver framework, such as persona, use `\"ovos-solver-hivemind-plugin\"` for the solver id\n\nStandalone usage\n\n```python\nfrom ovos_hivemind_solver import HiveMindSolver\n\nbot = HiveMindSolver()\nbot.connect()  # connection info from identity file\nprint(bot.spoken_answer(\"what is the speed of light?\"))\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A question solver plugin for OVOS",
    "version": "0.0.0a8",
    "project_urls": {
        "Homepage": "https://github.com/JarbasHiveMind/ovos-solver-hivemind-plugin"
    },
    "split_keywords": [
        "ovos",
        "openvoiceos",
        "plugin",
        "utterance",
        "fallback",
        "query"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f736fa134049c8a9853555f50efd52a6939c7ebb5a6a4bf95ba988e902668291",
                "md5": "d019a50478bdfa01ce2f2555c375560f",
                "sha256": "597a33482ef7ffe91eed6ab4c5e6a58aaaa07b9935fa60befe10354a9dab9437"
            },
            "downloads": -1,
            "filename": "ovos_solver_hivemind_plugin-0.0.0a8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d019a50478bdfa01ce2f2555c375560f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4292,
            "upload_time": "2024-05-28T06:13:08",
            "upload_time_iso_8601": "2024-05-28T06:13:08.568215Z",
            "url": "https://files.pythonhosted.org/packages/f7/36/fa134049c8a9853555f50efd52a6939c7ebb5a6a4bf95ba988e902668291/ovos_solver_hivemind_plugin-0.0.0a8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-28 06:13:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JarbasHiveMind",
    "github_project": "ovos-solver-hivemind-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "ovos-plugin-manager",
            "specs": []
        },
        {
            "name": "ovos-translate-server-plugin",
            "specs": []
        },
        {
            "name": "hivemind_bus_client",
            "specs": [
                [
                    ">=",
                    "0.0.4a21"
                ]
            ]
        }
    ],
    "lcname": "ovos-solver-hivemind-plugin"
}
        
Elapsed time: 0.32042s