ovos-solver-llmcpp-plugin


Nameovos-solver-llmcpp-plugin JSON
Version 0.0.0a3 PyPI version JSON
download
home_pagehttps://github.com/OpenVoiceOS/ovos-solver-plugin-llmcpp
SummaryA question solver plugin for ovos
upload_time2023-03-29 06:47:39
maintainer
docs_urlNone
authorjarbasai
requires_python
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://camo.githubusercontent.com/57d5fd32c5b51e73fce9077a45f155db3edecd5dfe31d272d73569cb23ef779c/68747470733a2f2f692e696d6775722e636f6d2f6c41645a6a376d2e6a706567' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/>  LLM.cpp Persona

Give OpenVoiceOS some sass with [Alpaca.cpp](https://github.com/antimatter15/alpaca.cpp), [GPT4All.cpp](https://github.com/zanussbaum/gpt4all.cpp) or [Bloomz.cpp](https://github.com/NouamaneTazi/bloomz.cpp)

This plugin requires providing the path to the executable and model, it uses subprocess which allows it to work with these programs without requiring python bindings

Dedicated plugins may exist for each LLM


## Examples 

* "What is best in life?"
* "Do you like dogs"
* "Does God exist?"


## Usage

Spoken answers api

```python
from ovos_solver_llmcpp import LLMcppSolver

ALPACA_MODEL_FILE = "./models/ggml-alpaca-7b-q4.bin"
GPT4ALL_MODEL_FILE = "./models/gpt4all-lora-quantized.bin"

# binpath = "~/alpaca.cpp/chat"
binpath = "~/gpt4all.cpp/chat"

bot = LLMcppSolver({"model": GPT4ALL_MODEL_FILE,
                    "executable_path": binpath})

sentence = bot.spoken_answer("Qual é o teu animal favorito?", {"lang": "pt-pt"})
# Meus animais favoritos são cães, gatos e tartarugas!

for q in ["Does god exist?",
          "what is the speed of light?",
          "what is the meaning of life?",
          "What is your favorite color?",
          "What is best in life?"]:
    a = bot.get_spoken_answer(q)
    print(q, a)

```




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OpenVoiceOS/ovos-solver-plugin-llmcpp",
    "name": "ovos-solver-llmcpp-plugin",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "ovos plugin utterance fallback query",
    "author": "jarbasai",
    "author_email": "jarbasai@mailfence.com",
    "download_url": "https://files.pythonhosted.org/packages/d9/d4/f0550e3f4c4590e5d543673b0a5c8f28574f681fe078373a0ca95b9c72a8/ovos-solver-llmcpp-plugin-0.0.0a3.tar.gz",
    "platform": null,
    "description": "# <img src='https://camo.githubusercontent.com/57d5fd32c5b51e73fce9077a45f155db3edecd5dfe31d272d73569cb23ef779c/68747470733a2f2f692e696d6775722e636f6d2f6c41645a6a376d2e6a706567' card_color='#40DBB0' width='50' height='50' style='vertical-align:bottom'/>  LLM.cpp Persona\n\nGive OpenVoiceOS some sass with [Alpaca.cpp](https://github.com/antimatter15/alpaca.cpp), [GPT4All.cpp](https://github.com/zanussbaum/gpt4all.cpp) or [Bloomz.cpp](https://github.com/NouamaneTazi/bloomz.cpp)\n\nThis plugin requires providing the path to the executable and model, it uses subprocess which allows it to work with these programs without requiring python bindings\n\nDedicated plugins may exist for each LLM\n\n\n## Examples \n\n* \"What is best in life?\"\n* \"Do you like dogs\"\n* \"Does God exist?\"\n\n\n## Usage\n\nSpoken answers api\n\n```python\nfrom ovos_solver_llmcpp import LLMcppSolver\n\nALPACA_MODEL_FILE = \"./models/ggml-alpaca-7b-q4.bin\"\nGPT4ALL_MODEL_FILE = \"./models/gpt4all-lora-quantized.bin\"\n\n# binpath = \"~/alpaca.cpp/chat\"\nbinpath = \"~/gpt4all.cpp/chat\"\n\nbot = LLMcppSolver({\"model\": GPT4ALL_MODEL_FILE,\n                    \"executable_path\": binpath})\n\nsentence = bot.spoken_answer(\"Qual \u00e9 o teu animal favorito?\", {\"lang\": \"pt-pt\"})\n# Meus animais favoritos s\u00e3o c\u00e3es, gatos e tartarugas!\n\nfor q in [\"Does god exist?\",\n          \"what is the speed of light?\",\n          \"what is the meaning of life?\",\n          \"What is your favorite color?\",\n          \"What is best in life?\"]:\n    a = bot.get_spoken_answer(q)\n    print(q, a)\n\n```\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A question solver plugin for ovos",
    "version": "0.0.0a3",
    "split_keywords": [
        "ovos",
        "plugin",
        "utterance",
        "fallback",
        "query"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "667d11b06e20ec9d7a3f016c113a553d0e828fa8049018831b45df8a2a0c5e9f",
                "md5": "99833f4b7f3ba58e544966e7560fe710",
                "sha256": "99dfeacea4f75113e68b27726a16427224d211f1a1348e935ccfbc07b5f85db8"
            },
            "downloads": -1,
            "filename": "ovos_solver_llmcpp_plugin-0.0.0a3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "99833f4b7f3ba58e544966e7560fe710",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10132,
            "upload_time": "2023-03-29T06:47:38",
            "upload_time_iso_8601": "2023-03-29T06:47:38.612397Z",
            "url": "https://files.pythonhosted.org/packages/66/7d/11b06e20ec9d7a3f016c113a553d0e828fa8049018831b45df8a2a0c5e9f/ovos_solver_llmcpp_plugin-0.0.0a3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9d4f0550e3f4c4590e5d543673b0a5c8f28574f681fe078373a0ca95b9c72a8",
                "md5": "d4056333cc86a95a1cc52dba9ab4dee3",
                "sha256": "3399c9d5c5856955f39e3ac49e162a9ddfa961e4568d36f59fb8400f35305d38"
            },
            "downloads": -1,
            "filename": "ovos-solver-llmcpp-plugin-0.0.0a3.tar.gz",
            "has_sig": false,
            "md5_digest": "d4056333cc86a95a1cc52dba9ab4dee3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9314,
            "upload_time": "2023-03-29T06:47:39",
            "upload_time_iso_8601": "2023-03-29T06:47:39.729562Z",
            "url": "https://files.pythonhosted.org/packages/d9/d4/f0550e3f4c4590e5d543673b0a5c8f28574f681fe078373a0ca95b9c72a8/ovos-solver-llmcpp-plugin-0.0.0a3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-29 06:47:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "OpenVoiceOS",
    "github_project": "ovos-solver-plugin-llmcpp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ovos-solver-llmcpp-plugin"
}
        
Elapsed time: 0.12808s