YandexGPTConfigManagerForAPIKey#

class yandex_gpt.YandexGPTConfigManagerForAPIKey(model_type: str | None = None, catalog_id: str | None = None, api_key: str | None = None)#

Bases: YandexGPTConfigManagerBase

Class for configuring the YandexGPT model using an API key. It supports setting model type, catalog ID, and API key directly or through environment variables. The class allows for configuration flexibility by providing the option to use environmental variables for model type (YANDEX_GPT_MODEL_TYPE), catalog ID (YANDEX_GPT_CATALOG_ID), and API key (YANDEX_GPT_API_KEY), which can override the constructor values if set.

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.

api_keyOptional[str]

The API key for authorization. More details on obtaining an API key can be found here: https://yandex.cloud/ru/docs/iam/operations/api-key/create