Flowise
47 строк · 1.9 Кб
1import { INodeParams, INodeCredential } from '../src/Interface'2
3class AzureOpenAIApi implements INodeCredential {4label: string5name: string6version: number7description: string8inputs: INodeParams[]9
10constructor() {11this.label = 'Azure OpenAI API'12this.name = 'azureOpenAIApi'13this.version = 1.014this.description =15'Refer to <a target="_blank" href="https://azure.microsoft.com/en-us/products/cognitive-services/openai-service">official guide</a> of how to use Azure OpenAI service'16this.inputs = [17{18label: 'Azure OpenAI Api Key',19name: 'azureOpenAIApiKey',20type: 'password',21description: `Refer to <a target="_blank" href="https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quickstart?tabs=command-line&pivots=rest-api#set-up">official guide</a> on how to create API key on Azure OpenAI`22},23{24label: 'Azure OpenAI Api Instance Name',25name: 'azureOpenAIApiInstanceName',26type: 'string',27placeholder: 'YOUR-INSTANCE-NAME'28},29{30label: 'Azure OpenAI Api Deployment Name',31name: 'azureOpenAIApiDeploymentName',32type: 'string',33placeholder: 'YOUR-DEPLOYMENT-NAME'34},35{36label: 'Azure OpenAI Api Version',37name: 'azureOpenAIApiVersion',38type: 'string',39placeholder: '2023-06-01-preview',40description:41'Description of Supported API Versions. Please refer <a target="_blank" href="https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#chat-completions">examples</a>'42}43]44}45}
46
47module.exports = { credClass: AzureOpenAIApi }48