Skip to main content

Based on the OpenAI

Register OpenAI account

Enter the API Keys management in the personal center and generate Secret Keys

Configure AI models

  1. Create or modify the configuration file /data/hap/script/volume/workflow/application-www-ext.properties, and add the following content:

    md.aigc.configs=[{\
    'model': 'GPT-3.5-Turbo', \
    'resource': 'https://api.openai.com/v1/chat/completions', \
    'deployment': 'gpt-3.5-turbo', \
    'apiVersion': '', \
    'apiKey': 'Secret Key', \
    'price': '0.015' \
    }]
    ParameterRemark
    modelInterface display title, fully customizable
    resourceFixed value https://api.openai.com/v1/chat/completions , cannot be modified
    deploymentModel name
    apiKeyOpenAI Secret Key
    priceNon HAP platform version is invalid; HAP Platform version is valid (deducted from organizational balance, can be priced by oneself)
  2. Mount the configuration file and add the following configuration to the volumes of the app service:

    volumes:
    - ./volume/workflow/application-www-ext.properties:/usr/local/MDPrivateDeployment/workflow/application-www-ext.properties
    - ./volume/workflow/application-www-ext.properties:/usr/local/MDPrivateDeployment/workflowconsumer/application-www-ext.properties
    - ./volume/workflow/application-www-ext.properties:/usr/local/MDPrivateDeployment/workflowintegration/application-www-ext.properties
  3. Restart the service