Based on the OpenAI
Register OpenAI account
Enter the API Keys management in the personal center and generate Secret Keys
Configure AI models
-
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' \
}]Parameter Remark model Interface display title, fully customizable resource Fixed value https://api.openai.com/v1/chat/completions , cannot be modified deployment Model name apiKey OpenAI Secret Key price Non HAP platform version is invalid; HAP Platform version is valid (deducted from organizational balance, can be priced by oneself) -
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 -
Restart the service