max-yandexgpt
Python-фреймворк для создания ботов в Max мессенджере с YandexGPT.
5 строк кода — и у вас работающий AI-бот со стримингом ответов.
Быстрый старт
pip install max-yandexgpt
from max_yandexgpt import MaxYandexGPT
bot = MaxYandexGPT(
max_token="ВАШ_ТОКЕН_MAX",
yandex_api_key="ВАШ_КЛЮЧ_YANDEXGPT",
yandex_folder_id="ВАШ_FOLDER_ID",
)
bot.run()
Возможности
- Стриминг ответов — бот отправляет placeholder, затем обновляет сообщение по мере генерации текста YandexGPT
- Обычный режим — простой запрос-ответ, одно сообщение
- Выбор модели — поддержка всех моделей YandexGPT
- Настройка — system prompt, температура, max_tokens
- Переменные окружения — задайте
MAX_TOKEN,YANDEX_API_KEY,YANDEX_FOLDER_IDвместо хардкода
Модели
| Модель | Описание |
|---|---|
yandexgpt-5-lite/latest |
Быстрая и дешёвая (по умолчанию) |
yandexgpt-5-pro/latest |
Стандартная |
yandexgpt-5.1/latest |
Новейшая |
aliceai-llm/latest |
AliceAI |
bot = MaxYandexGPT(
max_token="...",
yandex_api_key="...",
yandex_folder_id="...",
model="yandexgpt-5.1/latest",
)
Настройка
bot = MaxYandexGPT(
max_token="...",
yandex_api_key="...",
yandex_folder_id="...",
system_prompt="Ты — полезный ассистент.",
stream=True, # стриминг включён по умолчанию
temperature=0.3,
max_tokens=2000,
)
Или через переменные окружения:
bot = MaxYandexGPT() # читает из MAX_TOKEN, YANDEX_API_KEY, YANDEX_FOLDER_ID
bot.run()
Требования
- Python 3.11+
- Токен бота Max мессенджера (создать бота)
- API-ключ YandexGPT + folder ID (Yandex Cloud)
Лицензия
MIT
Metadata
Release files for max-yandexgpt 0.1.0
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 | |
|---|---|---|---|---|
| max_yandexgpt-0.1.0.tar.gz | 6.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| max_yandexgpt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / max_yandexgpt-0.1.0.tar.gz
| Download URL | max_yandexgpt-0.1.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2984499d7e5b93dcf5621ac16f3486a5a6a72fcf7713627ea427888d412e0a2
|
|
BLAKE2b-256 checksum How to use checksums |
c27c8064f706cbeb7567d839ba45c8b9f9df78781552af8464f0a4a8b9c139f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / max_yandexgpt-0.1.0-py3-none-any.whl
| Download URL | max_yandexgpt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b2f53f595f2f9b508c8fb7344ef344afc45daae07d74fdf06c7177584e55a7a
|
|
BLAKE2b-256 checksum How to use checksums |
b5526807095251b9fa27ae2e35311c3b428a9508c2917206e1ce5fb1ebb0f841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for max-yandexgpt 0.1.0
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.