perplexityai


Nameperplexityai JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://github.com/Ruu3f/perplexityai
SummaryA simple module to use Perplexity AI in Python.
upload_time2024-02-25 17:38:41
maintainer
docs_urlNone
authorRuu3f
requires_python>=3.6
licenseGPLv3
keywords artificial-intelligence perplexityai perplexity python api ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/pypi/v/perplexityai)](https://pypi.org/project/perplexityai)
[![Downloads](https://static.pepy.tech/badge/perplexityai)](https://pypi.org/project/perplexityai)
[![Status](https://img.shields.io/pypi/status/perplexityai)](https://pypi.org/project/perplexityai)

# perplexityai

A simple module to use Perplexity AI in Python.

## Get started:

```
python -m pip install -U perplexityai
```

Join my [Discord server](https://dsc.gg/devhub-rsgh) for live chat, support, or if you have any issues with this package.

## Support this repository:
- ⭐ **Star the project:** Star this repository. It means a lot to me! 💕
- 🎉 **Join my Discord Server:** Chat with me and others. [Join here](https://dsc.gg/devhub-rsgh):

[![DiscordWidget](https://discordapp.com/api/guilds/1137347499414278204/widget.png?style=banner2)](https://dsc.gg/devhub-rsgh)

## Example:

### Perplexity:
```python
from perplexityai import Perplexity

prompt = input("👦: ")
for a in Perplexity().generate_answer(prompt):
    print(f"🤖: {a['answer']}")
```

### Labs:
```python
"""
Models:
[
    "mixtral-8x7b-instruct",
    "llava-7b-chat",
    "llama-2-70b-chat",
    "codellama-34b-instruct",
    "mistral-7b-instruct",
    "pplx-7b-chat",
    "pplx-70b-chat",
    "pplx-7b-online",
    "pplx-70b-online",
]
"""
from perplexityai import Labs

prompt = input("👦: ")
for r in Labs().generate_answer(prompt, "MODEL"): 
    print(f"🤖: {r['output']}")
```

*Thanks to [nathanrchn's perplexityai](https://github.com/nathanrchn/perplexityai) for the original code.*

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Ruu3f/perplexityai",
    "name": "perplexityai",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "artificial-intelligence,perplexityai,perplexity,python,api,ai",
    "author": "Ruu3f",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/20/00/3cb07c17c9b63c8759055be5b7a0b42dfe676def45f992d28630c8a04638/perplexityai-1.0.5.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/pypi/v/perplexityai)](https://pypi.org/project/perplexityai)\r\n[![Downloads](https://static.pepy.tech/badge/perplexityai)](https://pypi.org/project/perplexityai)\r\n[![Status](https://img.shields.io/pypi/status/perplexityai)](https://pypi.org/project/perplexityai)\r\n\r\n# perplexityai\r\n\r\nA simple module to use Perplexity AI in Python.\r\n\r\n## Get started:\r\n\r\n```\r\npython -m pip install -U perplexityai\r\n```\r\n\r\nJoin my [Discord server](https://dsc.gg/devhub-rsgh) for live chat, support, or if you have any issues with this package.\r\n\r\n## Support this repository:\r\n- \u2b50 **Star the project:** Star this repository. It means a lot to me! \ud83d\udc95\r\n- \ud83c\udf89 **Join my Discord Server:** Chat with me and others. [Join here](https://dsc.gg/devhub-rsgh):\r\n\r\n[![DiscordWidget](https://discordapp.com/api/guilds/1137347499414278204/widget.png?style=banner2)](https://dsc.gg/devhub-rsgh)\r\n\r\n## Example:\r\n\r\n### Perplexity:\r\n```python\r\nfrom perplexityai import Perplexity\r\n\r\nprompt = input(\"\ud83d\udc66: \")\r\nfor a in Perplexity().generate_answer(prompt):\r\n    print(f\"\ud83e\udd16: {a['answer']}\")\r\n```\r\n\r\n### Labs:\r\n```python\r\n\"\"\"\r\nModels:\r\n[\r\n    \"mixtral-8x7b-instruct\",\r\n    \"llava-7b-chat\",\r\n    \"llama-2-70b-chat\",\r\n    \"codellama-34b-instruct\",\r\n    \"mistral-7b-instruct\",\r\n    \"pplx-7b-chat\",\r\n    \"pplx-70b-chat\",\r\n    \"pplx-7b-online\",\r\n    \"pplx-70b-online\",\r\n]\r\n\"\"\"\r\nfrom perplexityai import Labs\r\n\r\nprompt = input(\"\ud83d\udc66: \")\r\nfor r in Labs().generate_answer(prompt, \"MODEL\"): \r\n    print(f\"\ud83e\udd16: {r['output']}\")\r\n```\r\n\r\n*Thanks to [nathanrchn's perplexityai](https://github.com/nathanrchn/perplexityai) for the original code.*\r\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "A simple module to use Perplexity AI in Python.",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://github.com/Ruu3f/perplexityai",
        "Source": "https://github.com/Ruu3f/perplexityai"
    },
    "split_keywords": [
        "artificial-intelligence",
        "perplexityai",
        "perplexity",
        "python",
        "api",
        "ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c80e8832a03976c98daa7cc51e0c4bcc8ffc69ce7767e5bac24a928b0b8ad3af",
                "md5": "122201a001de9eb98d80c912183aff14",
                "sha256": "41c34214801ae3e9e258f360ec25aa88b65fb9d2e82441a4df18496efdce2c4f"
            },
            "downloads": -1,
            "filename": "perplexityai-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "122201a001de9eb98d80c912183aff14",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 16449,
            "upload_time": "2024-02-25T17:38:39",
            "upload_time_iso_8601": "2024-02-25T17:38:39.273397Z",
            "url": "https://files.pythonhosted.org/packages/c8/0e/8832a03976c98daa7cc51e0c4bcc8ffc69ce7767e5bac24a928b0b8ad3af/perplexityai-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20003cb07c17c9b63c8759055be5b7a0b42dfe676def45f992d28630c8a04638",
                "md5": "64d44bff8b1df4603c4e21cd14263c84",
                "sha256": "9254d757fdeda880f3c265d4c045673859676a3c4d67cf071cc721617f0657f8"
            },
            "downloads": -1,
            "filename": "perplexityai-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "64d44bff8b1df4603c4e21cd14263c84",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 16519,
            "upload_time": "2024-02-25T17:38:41",
            "upload_time_iso_8601": "2024-02-25T17:38:41.141443Z",
            "url": "https://files.pythonhosted.org/packages/20/00/3cb07c17c9b63c8759055be5b7a0b42dfe676def45f992d28630c8a04638/perplexityai-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-25 17:38:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Ruu3f",
    "github_project": "perplexityai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "perplexityai"
}
        
Elapsed time: 0.22774s