Module for simple connecting to YandexGPT Api
Project description
(Module for simple connecting to YandexGPT Api)
Example to use:
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
from yandex_gpt import YandexGPT, YandexGPTModels
yandex_gpt_client = YandexGPT(
OAUTH_TOKEN,
FOLDER_ID,
gpt_model=YandexGPTModels.YANDEX_GPT_LITE
)
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
yandex_gpt-0.3.0.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file yandex_gpt-0.3.0.tar.gz
.
File metadata
- Download URL: yandex_gpt-0.3.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.6 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7ff34e54c8b252849d12098e79ac4d8bf08cfcfc5d992b535b8b0b8feb785895
|
|
MD5 |
51d7b340244393dd709ec982911691d6
|
|
BLAKE2b-256 |
7eddb659555e908e27fe443b073bc23e842c45c9bc9ae43417fc8977b794efab
|
File details
Details for the file yandex_gpt-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: yandex_gpt-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.6 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b2c35a26c7e4264c194a770d58efe0d29af34b9ea383c9a33056d25ca7d6b973
|
|
MD5 |
b6f8092322f08c92b8f5d620222ca0b3
|
|
BLAKE2b-256 |
3f75f9f2fc3aa476abed1333c054147d49f6aa4141f0cdfbf16703bf34563f30
|