ChatYandexGPT()_BaseYandexGPTBaseChatModelYandexGPT large language models.
There are two authentication options for the service account
with the ai.languageModels.user role:
- You can specify the token in a constructor parameter iam_token
or in an environment variable YC_IAM_TOKEN.
- You can specify the key in a constructor parameter api_key
or in an environment variable YC_API_KEY.
Example:
.. code-block:: python
from langchain_community.chat_models import ChatYandexGPT chat_model = ChatYandexGPT(iam_token="t1.9eu...")