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.1.0.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file yandex_gpt-0.1.0.tar.gz
.
File metadata
- Download URL: yandex_gpt-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.6 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
63530582a5fc1b8a4bc47233840611a6047e5e611ddad51869f9abb5b2150281
|
|
MD5 |
af489cfc4650a2e7e135f09b7d62182f
|
|
BLAKE2b-256 |
201da47b0d723afaee4b56afef78890d9357478d9539e0019ba3f59a77b295ba
|
File details
Details for the file yandex_gpt-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: yandex_gpt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.6 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
54b44512f733655c2c475464f8998c17044a27ef9b594bda0004b305723a7cba
|
|
MD5 |
e8c35951932ea5345f627b8160d6d815
|
|
BLAKE2b-256 |
242cb57acac8a3b61c013cee3c1b65e585d1ad753d86491cd3e429db229c15d6
|