Based on OpenAI
Register OpenAI account
Enter the API Keys management in the personal center and generate Secret Keys
Configure AI model
-
Create or modify the configuration file
/data/mingdao/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', \
'deployment': 'gpt-3.5-turbo', \
'apiVersion': '', \
'apiKey': 'Secret Key', \
'price': '0.012' \
}]Parameter Remark model Interface display title, fully customizable resource The model's base_url, for example https://api.openai.com/v1
deployment Model name apiKey OpenAI Secret Key price Only applicable to the HAP platform version (deducted from the organization's balance). Custom pricing is supported, charged per 1,000 tokens, with no distinction between input and output. Not applicable to the non-HAP platform version. -
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
- ./volume/workflow/application-www-ext.properties:/usr/local/MDPrivateDeployment/workflowplugin/application-www-ext.properties -
Restart the service