yandex_gpt


Nameyandex_gpt JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryModule for simple connecting to YandexGPT Api
upload_time2024-06-23 00:31:49
maintainerNone
docs_urlNone
authorvladartemenko
requires_python<4.0,>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## (Module for simple connecting to YandexGPT Api)

Example to use:
```python
from yandex_gpt import YandexGPT, Messages, SystemMessage, UserMessage

yandex_gpt_client = YandexGPT(
    OAUTH_TOKEN,
    FOLDER_ID
)

chat = Messages(
    SystemMessage('Ты в диалоге с пользователем. Отвечай на все его запросы'),
    UserMessage('Привет! Посоветуй фильм на вечер')
)

response = yandex_gpt_client.completion(chat)
print(response.alternatives[0].message)
```

It is possible to replace the model like this
```python
from yandex_gpt import YandexGPT, YandexGPTModels

yandex_gpt_client = YandexGPT(
    OAUTH_TOKEN,
    FOLDER_ID,
    gpt_model=YandexGPTModels.YANDEX_GPT_LITE
)
```
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "yandex_gpt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "vladartemenko",
    "author_email": "skabe99@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/ac/15/6bec9959fcfef33bdecb1cc6d52a96ad964cb5ae06a44163f49e1f244d08/yandex_gpt-0.2.0.tar.gz",
    "platform": null,
    "description": "## (Module for simple connecting to YandexGPT Api)\n\nExample to use:\n```python\nfrom yandex_gpt import YandexGPT, Messages, SystemMessage, UserMessage\n\nyandex_gpt_client = YandexGPT(\n    OAUTH_TOKEN,\n    FOLDER_ID\n)\n\nchat = Messages(\n    SystemMessage('\u0422\u044b \u0432 \u0434\u0438\u0430\u043b\u043e\u0433\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041e\u0442\u0432\u0435\u0447\u0430\u0439 \u043d\u0430 \u0432\u0441\u0435 \u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b'),\n    UserMessage('\u041f\u0440\u0438\u0432\u0435\u0442! \u041f\u043e\u0441\u043e\u0432\u0435\u0442\u0443\u0439 \u0444\u0438\u043b\u044c\u043c \u043d\u0430 \u0432\u0435\u0447\u0435\u0440')\n)\n\nresponse = yandex_gpt_client.completion(chat)\nprint(response.alternatives[0].message)\n```\n\nIt is possible to replace the model like this\n```python\nfrom yandex_gpt import YandexGPT, YandexGPTModels\n\nyandex_gpt_client = YandexGPT(\n    OAUTH_TOKEN,\n    FOLDER_ID,\n    gpt_model=YandexGPTModels.YANDEX_GPT_LITE\n)\n```",
    "bugtrack_url": null,
    "license": null,
    "summary": "Module for simple connecting to YandexGPT Api",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "32757a56675ac12d8288491fd1eec16aa13fddc781b94eb5acc57cadd8deea54",
                "md5": "6627e233e4369ef27b7c36f08d9e51d3",
                "sha256": "527eb1ba37fff6bf7332af68b8e911b47e8ccee0d2546aee3293609b9a5a750f"
            },
            "downloads": -1,
            "filename": "yandex_gpt-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6627e233e4369ef27b7c36f08d9e51d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 5637,
            "upload_time": "2024-06-23T00:31:43",
            "upload_time_iso_8601": "2024-06-23T00:31:43.760731Z",
            "url": "https://files.pythonhosted.org/packages/32/75/7a56675ac12d8288491fd1eec16aa13fddc781b94eb5acc57cadd8deea54/yandex_gpt-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac156bec9959fcfef33bdecb1cc6d52a96ad964cb5ae06a44163f49e1f244d08",
                "md5": "f3c19c563798f4f6cc3355893a65b4ea",
                "sha256": "4acc5e968316b74a071d03c412fc38a2b5845d2fd9099cc24c732ab4131d1e7b"
            },
            "downloads": -1,
            "filename": "yandex_gpt-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f3c19c563798f4f6cc3355893a65b4ea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 3752,
            "upload_time": "2024-06-23T00:31:49",
            "upload_time_iso_8601": "2024-06-23T00:31:49.893430Z",
            "url": "https://files.pythonhosted.org/packages/ac/15/6bec9959fcfef33bdecb1cc6d52a96ad964cb5ae06a44163f49e1f244d08/yandex_gpt-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-23 00:31:49",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "yandex_gpt"
}
        
Elapsed time: 0.24822s