Configuring a generative AI secret

To activate the generative AI feature in Automation Decision Services, you must create a Kubernetes secret.

About this task

You do this configuration to connect to a watsonx.ai service that hosts the large language models (LLMs). Automation Decision Services calls this service when generation is triggered in a decision.

Procedure

  1. Create a Kubernetes secret to activate the generative AI feature:
    apiVersion: v1
    kind: Secret
    metadata:
      name: ads-genai-secret
    type: Opaque
    stringData:
      genAI: |- 
        { 
          "name": "GENAI",   
          "type": "WML",   
          "description": null,   
          "updateTime": 0,   
          "authInfo": { 
            "authType": "IAM",
            "apiKey": "<watsonx_ai_api_key>",
            "authUrl": "https://iam.cloud.ibm.com/identity/token"   },   
            "providerAdditionalInfo": {     
                "providerType": "WML",
                "mlUrl": "https://<location>.ml.cloud.ibm.com/",     
                "projectId": "<project_id>"
              },   
          "version": "V1" 
        }
    where <location> in mlUrl is:
    • us-south for Dallas
    • eu-gb for London
    • eu-de for Frankfurt
    • jp-tok for Tokyo
    • au-syd for Sydney

    Also, where <watsonx_ai_api_key> and <project_id> are retrieved from your IBM watsonx account:

    1. Create an IBM Cloud API key.

      i. Log in to IBM Cloud and select Manage > Access (IAM) > API keys.

      ii. Create an API key for your own personal identity.

      iii. Copy the key value, and save it in a secure place.

    2. Create an IBM Cloud service. For more information, see Creating and managing IBM Cloud services.
    3. Create a new project.
    4. Associate your IBM Cloud service to the project. For your information, see Adding associated services to a project.
    5. Go to Project > (project_name) > Manage and copy the project ID.
  2. The secret must be referenced in spec.ads_configuration.genai_secret_name.