ovos-solver-openai-persona-plugin


Nameovos-solver-openai-persona-plugin JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/OpenVoiceOS/ovos-solver-plugin-openai-persona
SummaryA question solver plugin for ovos
upload_time2024-11-13 19:57:25
maintainerNone
docs_urlNone
authorjarbasai
requires_pythonNone
licenseMIT
keywords ovos plugin utterance fallback query
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # <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'/> OpenAI Persona

Give OpenVoiceOS some sass with OpenAI!

Leverages [OpenAI Completions API](https://platform.openai.com/docs/api-reference/completions/create) to create some fun interactions.  Phrases not explicitly handled by other skills will be run by a LLM, so nearly every interaction will have _some_ response.  But be warned, Mycroft might become a bit obnoxious...


## Usage

Spoken answers api with OpenAI or [LocalAI](https://github.com/go-skynet/LocalAI) completions backend, prompt engineering is used to behave like a voice assistant

```python
from ovos_solver_openai_persona import OpenAIPersonaSolver

bot = OpenAIPersonaSolver({"key": "sk-XXX",
                           "persona": "helpful, creative, clever, and very friendly"})
print(bot.get_spoken_answer("describe quantum mechanics in simple terms"))
# Quantum mechanics is a branch of physics that deals with the behavior of particles on a very small scale, such as atoms and subatomic particles. It explores the idea that particles can exist in multiple states at once and that their behavior is not predictable in the traditional sense.
print(bot.spoken_answer("Quem encontrou o caminho maritimo para o Brazil", {"lang": "pt-pt"}))
# Explorador português Pedro Álvares Cabral é creditado com a descoberta do Brasil em 1500

```

This plugin will work with [ovos-persona-server](https://github.com/OpenVoiceOS/ovos-persona-server)

## Configuration

This plugin can be configured to use a LocalAI server instead of OpenAI.

```json
{
    "api_url": <your_local_LocalAI_server_url>,
    "key": <your_OpenAI_key>,
    "enable_memory": true,
    "memory_size": 15,
    "initial_prompt": "You are a helpful assistant."
}
```

When using LocalAI, the `"key"` can be anything, but it has to exist.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OpenVoiceOS/ovos-solver-plugin-openai-persona",
    "name": "ovos-solver-openai-persona-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ovos plugin utterance fallback query",
    "author": "jarbasai",
    "author_email": "jarbasai@mailfence.com",
    "download_url": "https://files.pythonhosted.org/packages/37/bd/87dad3ed04d640b8c5125227ab7efa23eb9bac2aff581f9e0f734fd295d9/ovos-solver-openai-persona-plugin-1.1.0.tar.gz",
    "platform": null,
    "description": "# <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'/> OpenAI Persona\n\nGive OpenVoiceOS some sass with OpenAI!\n\nLeverages [OpenAI Completions API](https://platform.openai.com/docs/api-reference/completions/create) to create some fun interactions.  Phrases not explicitly handled by other skills will be run by a LLM, so nearly every interaction will have _some_ response.  But be warned, Mycroft might become a bit obnoxious...\n\n\n## Usage\n\nSpoken answers api with OpenAI or [LocalAI](https://github.com/go-skynet/LocalAI) completions backend, prompt engineering is used to behave like a voice assistant\n\n```python\nfrom ovos_solver_openai_persona import OpenAIPersonaSolver\n\nbot = OpenAIPersonaSolver({\"key\": \"sk-XXX\",\n                           \"persona\": \"helpful, creative, clever, and very friendly\"})\nprint(bot.get_spoken_answer(\"describe quantum mechanics in simple terms\"))\n# Quantum mechanics is a branch of physics that deals with the behavior of particles on a very small scale, such as atoms and subatomic particles. It explores the idea that particles can exist in multiple states at once and that their behavior is not predictable in the traditional sense.\nprint(bot.spoken_answer(\"Quem encontrou o caminho maritimo para o Brazil\", {\"lang\": \"pt-pt\"}))\n# Explorador portugu\u00eas Pedro \u00c1lvares Cabral \u00e9 creditado com a descoberta do Brasil em 1500\n\n```\n\nThis plugin will work with [ovos-persona-server](https://github.com/OpenVoiceOS/ovos-persona-server)\n\n## Configuration\n\nThis plugin can be configured to use a LocalAI server instead of OpenAI.\n\n```json\n{\n    \"api_url\": <your_local_LocalAI_server_url>,\n    \"key\": <your_OpenAI_key>,\n    \"enable_memory\": true,\n    \"memory_size\": 15,\n    \"initial_prompt\": \"You are a helpful assistant.\"\n}\n```\n\nWhen using LocalAI, the `\"key\"` can be anything, but it has to exist.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A question solver plugin for ovos",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/OpenVoiceOS/ovos-solver-plugin-openai-persona"
    },
    "split_keywords": [
        "ovos",
        "plugin",
        "utterance",
        "fallback",
        "query"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6aff9ae69ccf875cf584d44240dfef68ec091619ca9e87d378d6e8f2f05ac909",
                "md5": "62b39b6189af6a9c30b3a01cb2f1e1c5",
                "sha256": "23e77f970dada2f2c1d11e20de193696fc96a4f2533ef2cc017e0d7c88b26257"
            },
            "downloads": -1,
            "filename": "ovos_solver_openai_persona_plugin-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "62b39b6189af6a9c30b3a01cb2f1e1c5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12299,
            "upload_time": "2024-11-13T19:57:24",
            "upload_time_iso_8601": "2024-11-13T19:57:24.119524Z",
            "url": "https://files.pythonhosted.org/packages/6a/ff/9ae69ccf875cf584d44240dfef68ec091619ca9e87d378d6e8f2f05ac909/ovos_solver_openai_persona_plugin-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37bd87dad3ed04d640b8c5125227ab7efa23eb9bac2aff581f9e0f734fd295d9",
                "md5": "e5b77bcd8dee370addc7058dc9df523e",
                "sha256": "9e2bfedef1945c18103ffaf8c893e0ca662af8553faaaa160d9b8546bb029204"
            },
            "downloads": -1,
            "filename": "ovos-solver-openai-persona-plugin-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e5b77bcd8dee370addc7058dc9df523e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10760,
            "upload_time": "2024-11-13T19:57:25",
            "upload_time_iso_8601": "2024-11-13T19:57:25.678620Z",
            "url": "https://files.pythonhosted.org/packages/37/bd/87dad3ed04d640b8c5125227ab7efa23eb9bac2aff581f9e0f734fd295d9/ovos-solver-openai-persona-plugin-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 19:57:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OpenVoiceOS",
    "github_project": "ovos-solver-plugin-openai-persona",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ovos-solver-openai-persona-plugin"
}
        
Elapsed time: 0.50103s