Python framework for building Max messenger bots powered by YandexGPT
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
max_yandexgpt-0.1.0.tar.gz
(6.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file max_yandexgpt-0.1.0.tar.gz.
File metadata
- Download URL: max_yandexgpt-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2984499d7e5b93dcf5621ac16f3486a5a6a72fcf7713627ea427888d412e0a2
|
|
| MD5 |
c12d81dccbbc332b448b410d52776fb7
|
|
| BLAKE2b-256 |
c27c8064f706cbeb7567d839ba45c8b9f9df78781552af8464f0a4a8b9c139f4
|
File details
Details for the file max_yandexgpt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: max_yandexgpt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b2f53f595f2f9b508c8fb7344ef344afc45daae07d74fdf06c7177584e55a7a
|
|
| MD5 |
a48bf44c01cd436666ae8c2c9d7d6ae5
|
|
| BLAKE2b-256 |
b5526807095251b9fa27ae2e35311c3b428a9508c2917206e1ce5fb1ebb0f841
|