Коннектор к YandexGPT Lite на Python
Как использовать коннектор:
-
Активируем платёжный аккаунт Yandex.Cloud: https://console.cloud.yandex.ru/billing?section=accounts. Можно активировать пробный период на 60 дней. Вам потребуется ID папки Yandex.Cloud, эти папки находятся тут: https://console.cloud.yandex.ru/folders/. Folder ID можно взять из URL или из интерфейса.
-
Получаем токен вашего аккаунта на Яндексе для подключения к YandexGPT:
https://oauth.yandex.ru/authorize?response_type=token&client_id=1a6990aa636648e9b2ef855fa7bec2fb
- Устанавливаем пакет pip:
pip install yandexgptlite
- Импортируем класс из пакета:
from yandexgptlite import YandexGPTLite
- Подключаемся к Yandex GPT, создавая экземпляр класса (требуется указать папку Yandex Cloud и токен):
account = YandexGPTLite('b1g2k730lqhu8pc02a', 'y0_AgAAAAMf8GzATuwQAAAD15w-py1O8Ucn-RN6bl9W8hwdkX7vuE' )
- Вызываем функцию обращения к GPT для нашего аккаунта (температура от 0 до 1, где единица - максимум творчества):
text = account.create_completion('Привет! Как твои дела?', '0.6')
print(text) #Привет! У меня всё хорошо, как дела у вас?
Лицензия
Этот проект распространяется под лицензией MIT. См. файл https://github.com/morinad/yandexgptlite/blob/main/LICENSE.txt (LICENSE) для дополнительной информации.
Metadata
Release files for yandexgptlite 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yandexgptlite-0.1.7.tar.gz | 3.7 kB | Without provenance | Details for yandexgptlite-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yandexgptlite-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for yandexgptlite-0.1.7-py3-none-any.whl |
Total release size: 7.8 kB
Release files / yandexgptlite-0.1.7.tar.gz
| Download URL | yandexgptlite-0.1.7.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ed40e9938f38afba22e7e92d71a39229de6a157a117e25e30e64cefb763d1ca
|
|
BLAKE2b-256 checksum How to use checksums |
dc545182823623e8868644854768eb1519bf02f99dde76dc49b4b0bca38cb934
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / yandexgptlite-0.1.7-py3-none-any.whl
| Download URL | yandexgptlite-0.1.7-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ff89feb1d55c94f00e63dbf921a897049a6207d6a6052658bd867ef94558ed7
|
|
BLAKE2b-256 checksum How to use checksums |
a55dfbe6dbe616b37b3d697caa346d8d3ff59dcc6ea8862fda2f49165dbbffab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for yandexgptlite 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.