YandexGPTConfigManagerForIAMToken#
- class yandex_gpt.YandexGPTConfigManagerForIAMToken(model_type: str | None = None, catalog_id: str | None = None, iam_token: str | None = None)#
Bases:
YandexGPTConfigManagerBaseClass for configuring the YandexGPT model using an IAM token. It handles configurations involving model type, catalog ID, and IAM token, with options for direct input or initialization via environment variables. The class provides several pathways for initializing these configurations:
Directly through constructor parameters.
Through environment variables YANDEX_GPT_MODEL_TYPE, YANDEX_GPT_CATALOG_ID, and YANDEX_GPT_IAM_TOKEN.
Automatically generating the IAM token using the environment variables YANDEX_GPT_IAM_URL, YANDEX_GPT_SERVICE_ACCOUNT_ID, YANDEX_GPT_SERVICE_ACCOUNT_KEY_ID, YANDEX_GPT_CATALOG_ID, and YANDEX_GPT_PRIVATE_KEY.
Attributes#
- model_typeOptional[str]
The model type to use. Supported values include ‘yandexgpt’, ‘yandexgpt-lite’, ‘summarization’.
- catalog_idOptional[str]
The Catalog ID on YandexCloud to be used.
- iam_tokenOptional[str]
The IAM token for authorization. Details on obtaining an IAM token can be found here: https://yandex.cloud/ru/docs/iam/operations/iam-token/create-for-sa