Skip to Content

AI Integration

YandexGPT Integration

To integrate Primo RPA with YandexGPT:

  1. Create an account in the Yandex ID service if you don’t have one.

  2. Install Yandex Cloud CLI:

    • Download and install Yandex Cloud CLI following the official instructions.
    • After installation, run the yc init command to bind the CLI to your account.
  3. Get OAuth Token:

    • Go to this link.
    • Allow access if required.
    • Copy the OAuth token and save it. You will need it for the following steps.
  4. Perform the actions from the Create Profile section. Run the commands to create a profile:

    yc config set token <OAuth-token> yc config set cloud-id <Cloud-ID> yc config set folder-id <Folder-ID> yc config set compute-default-zone ru-central1-b

Get the result, which should look like this:

token: y0_AgA...wvs7N4 cloud-id: b1g159pa15cd******** folder-id: b1g8o9jbt58******** compute-default-zone: ru-central1-b
  1. Get IAM Token to work with GPT: You can get an IAM token in two ways:

    • Via Yandex Cloud CLI: Run the command:

      yc iam create-token
    • Via PowerShell (without using CLI):
      If you are not using CLI, exchange the OAuth token for an IAM token using the following command:

      $yandexPassportOauthToken = "<OAuth-token>" $Body = @{ yandexPassportOauthToken = "$yandexPassportOauthToken" } | ConvertTo-Json -Compress Invoke-RestMethod -Method 'POST' -Uri 'https://iam.api.cloud.yandex.net/iam/v1/tokens' -Body $Body -ContentType 'application/json' | Select-Object -ExpandProperty iamToken

      See more details in the Yandex documentation.

    Note: The lifetime of the IAM token does not exceed 12 hours, but it is recommended to request it every hour.

  2. Go to the Yandex Cloud Management Console:

  3. On the left, in the navigation tree, select the organization level and then – the Access bindings section.

    ai2.png

    • Find the desired user and select the Change Roles function.
    • Click Add Role.
    • Select ai.languageModels.user from the dropdown list.
    • Click Save.

    ai3.png

  4. Create a Billing Account:

    • In the Yandex Cloud Console, go to the default catalog or the catalog you need.
    • Click on YandexGPT and fill out the billing account creation form.
  5. Use the IAM token and Folder ID for integration:

Last updated on