ovos-solver-dialogpt-plugin


Nameovos-solver-dialogpt-plugin JSON
Version 0.0.0a1 PyPI version JSON
download
home_pagehttps://github.com/OpenVoiceOS/ovos-solver-plugin-dialogpt
SummaryA question solver plugin for ovos
upload_time2023-03-25 03:46:53
maintainer
docs_urlNone
authorjarbasai
requires_python
licenseMIT
keywords ovos plugin utterance fallback query
VCS
bugtrack_url
requirements transformers neon_solvers
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'/> DialoGPT Persona

Give Mycroft some sass with [DialoGPT](https://github.com/microsoft/DialoGPT)

While this can not compete with [ChatGPT Persona](https://github.com/OpenVoiceOS/ovos-solver-plugin-openai-persona) it is an offline alternative, you can use any model from huggingface to have different personas

Find models [here](https://huggingface.co/models?pipeline_tag=conversational&search=dialogpt)

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


## Usage

Spoken answers api

```python
from ovos_solver_dialogpt import DialoGPTSolver

d = DialoGPTSolver({"model": "microsoft/DialoGPT-large"})
sentence = d.spoken_answer("What is best in life?")
print(sentence)
# To be alive.

sentence = d.spoken_answer("Qual é o teu animal favorito?", {"lang": "pt-pt"})
print(sentence)
# Adoro todos os animais

d = DialoGPTSolver({"model": "ingen51/DialoGPT-medium-GPT4"})
for q in ["hello!",
          "who are you?",
          "what is the speed of light?",
          "what is the meaning of life?",
          "Does god exist?",
          "What is your favorite color?",
          "What is your favorite animal?",
          "What is best in life?"]:
    a = d.get_spoken_answer(q)
    print(q, a)
    # hello! Hiya there.
    # who are you? I'm the guy that runs the place. 
    # what is the speed of light? About 186,600 mph
    # what is the meaning of life? The meaning of existence is to suffer alone.
    # Does god exist? Yes. He does.
    # What is your favorite color? I don't have one in particular.
    # What is your favorite animal? Horned lizard.
    # What is best in life? A warm home.
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OpenVoiceOS/ovos-solver-plugin-dialogpt",
    "name": "ovos-solver-dialogpt-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/d2/c7/c08566d78e9dcbef1e4b68c60d937ff355c8a11c4e33fb5e6ff70f4aa114/ovos-solver-dialogpt-plugin-0.0.0a1.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'/> DialoGPT Persona\n\nGive Mycroft some sass with [DialoGPT](https://github.com/microsoft/DialoGPT)\n\nWhile this can not compete with [ChatGPT Persona](https://github.com/OpenVoiceOS/ovos-solver-plugin-openai-persona) it is an offline alternative, you can use any model from huggingface to have different personas\n\nFind models [here](https://huggingface.co/models?pipeline_tag=conversational&search=dialogpt)\n\n## Examples \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_dialogpt import DialoGPTSolver\n\nd = DialoGPTSolver({\"model\": \"microsoft/DialoGPT-large\"})\nsentence = d.spoken_answer(\"What is best in life?\")\nprint(sentence)\n# To be alive.\n\nsentence = d.spoken_answer(\"Qual \u00e9 o teu animal favorito?\", {\"lang\": \"pt-pt\"})\nprint(sentence)\n# Adoro todos os animais\n\nd = DialoGPTSolver({\"model\": \"ingen51/DialoGPT-medium-GPT4\"})\nfor q in [\"hello!\",\n          \"who are you?\",\n          \"what is the speed of light?\",\n          \"what is the meaning of life?\",\n          \"Does god exist?\",\n          \"What is your favorite color?\",\n          \"What is your favorite animal?\",\n          \"What is best in life?\"]:\n    a = d.get_spoken_answer(q)\n    print(q, a)\n    # hello! Hiya there.\n    # who are you? I'm the guy that runs the place. \n    # what is the speed of light? About 186,600 mph\n    # what is the meaning of life? The meaning of existence is to suffer alone.\n    # Does god exist? Yes. He does.\n    # What is your favorite color? I don't have one in particular.\n    # What is your favorite animal? Horned lizard.\n    # What is best in life? A warm home.\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A question solver plugin for ovos",
    "version": "0.0.0a1",
    "split_keywords": [
        "ovos",
        "plugin",
        "utterance",
        "fallback",
        "query"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3691d9cfb8ad0444b07ec64e12547feaaf3044ee92572316cc7b29539ed2cd00",
                "md5": "714809c5b8918a42c23a8d886646d496",
                "sha256": "860529856a23b917f761b014fb732c3ce9efafa096fe00241af8c7c4cfb1b8ab"
            },
            "downloads": -1,
            "filename": "ovos_solver_dialogpt_plugin-0.0.0a1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "714809c5b8918a42c23a8d886646d496",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8373,
            "upload_time": "2023-03-25T03:46:52",
            "upload_time_iso_8601": "2023-03-25T03:46:52.089849Z",
            "url": "https://files.pythonhosted.org/packages/36/91/d9cfb8ad0444b07ec64e12547feaaf3044ee92572316cc7b29539ed2cd00/ovos_solver_dialogpt_plugin-0.0.0a1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2c7c08566d78e9dcbef1e4b68c60d937ff355c8a11c4e33fb5e6ff70f4aa114",
                "md5": "1c98593f7d144bd3322af686efde7404",
                "sha256": "718f0ba3d86f008bc1db5bc2eed6cc1c3c7b9c92a0692a0f429e095110e93c03"
            },
            "downloads": -1,
            "filename": "ovos-solver-dialogpt-plugin-0.0.0a1.tar.gz",
            "has_sig": false,
            "md5_digest": "1c98593f7d144bd3322af686efde7404",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7865,
            "upload_time": "2023-03-25T03:46:53",
            "upload_time_iso_8601": "2023-03-25T03:46:53.173185Z",
            "url": "https://files.pythonhosted.org/packages/d2/c7/c08566d78e9dcbef1e4b68c60d937ff355c8a11c4e33fb5e6ff70f4aa114/ovos-solver-dialogpt-plugin-0.0.0a1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-25 03:46:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "OpenVoiceOS",
    "github_project": "ovos-solver-plugin-dialogpt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "transformers",
            "specs": []
        },
        {
            "name": "neon_solvers",
            "specs": []
        }
    ],
    "lcname": "ovos-solver-dialogpt-plugin"
}
        
Elapsed time: 0.06023s