Yandex GPT Chat Model icon

Yandex GPT Chat Model

For advanced usage with an AI chain

Yandex GPT Chat Model

AI-generated

Overview

This node integrates with Yandex's GPT-based chat models to generate AI completions based on user input. It is designed for advanced usage within AI chains, allowing users to leverage Yandex's language models for tasks such as text generation, conversation simulation, content creation, or any scenario requiring natural language understanding and generation.

Practical examples include:

  • Generating creative writing or marketing copy.
  • Building chatbots or virtual assistants using Yandex GPT models.
  • Performing analytical or multiple-choice style completions by adjusting randomness.
  • Experimenting with different Yandex GPT model versions and configurations.

Properties

Name Meaning
Model The specific Yandex GPT model to use for generating completions. Can be specified either as a URI (e.g., gpt://<folder_id>/yandexgpt-lite/latest) or selected from a searchable list of available models and their versions.
Options Additional parameters to customize the completion behavior:
• Temperature: Controls randomness in responses, ranging from 0 (analytical, deterministic) to 1 (creative, generative). Default is 0.3.
• Max Tokens: Maximum number of tokens allowed in a single completion. Must be > 0; default is 2000.

Output

The node outputs an object under the key Model containing a property response, which holds an instance of the Yandex GPT chat model client configured with the specified model URI and options. This output can be used downstream in workflows to interact with the model for generating completions or further AI processing.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with Yandex's GPT service.
  • The node depends on the @langchain/yandex package to instantiate and interact with the Yandex GPT chat models.
  • The user must have access to a valid Yandex Cloud folder ID if specifying the model via URI.
  • Network connectivity to Yandex Cloud services is necessary.

Troubleshooting

  • Invalid URI error: When specifying the model as a URI, it must match the pattern ^(gpt|ds)://(.+)/(.+). Ensure the URI is correctly formatted, including the protocol prefix (gpt://), folder ID, and model/version segment.
  • Missing or invalid API credentials: The node requires a valid API key credential for Yandex GPT. Verify that the credential is set up correctly in n8n and has appropriate permissions.
  • Token limit exceeded: The maxTokens option must be greater than zero and within limits supported by the chosen model. If you encounter errors related to token limits, try lowering this value.
  • Network or authentication failures: Check network connectivity and ensure the API key is active and not expired.
  • Model not found: If selecting from the list, ensure the model/version combination exists and is supported.

Links and References

Discussion