Flowise

Форк
0
/
AzureOpenAIApi.credential.ts 
47 строк · 1.9 Кб
1
import { INodeParams, INodeCredential } from '../src/Interface'
2

3
class AzureOpenAIApi implements INodeCredential {
4
    label: string
5
    name: string
6
    version: number
7
    description: string
8
    inputs: INodeParams[]
9

10
    constructor() {
11
        this.label = 'Azure OpenAI API'
12
        this.name = 'azureOpenAIApi'
13
        this.version = 1.0
14
        this.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'
16
        this.inputs = [
17
            {
18
                label: 'Azure OpenAI Api Key',
19
                name: 'azureOpenAIApiKey',
20
                type: 'password',
21
                description: `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
            {
24
                label: 'Azure OpenAI Api Instance Name',
25
                name: 'azureOpenAIApiInstanceName',
26
                type: 'string',
27
                placeholder: 'YOUR-INSTANCE-NAME'
28
            },
29
            {
30
                label: 'Azure OpenAI Api Deployment Name',
31
                name: 'azureOpenAIApiDeploymentName',
32
                type: 'string',
33
                placeholder: 'YOUR-DEPLOYMENT-NAME'
34
            },
35
            {
36
                label: 'Azure OpenAI Api Version',
37
                name: 'azureOpenAIApiVersion',
38
                type: 'string',
39
                placeholder: '2023-06-01-preview',
40
                description:
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

47
module.exports = { credClass: AzureOpenAIApi }
48

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.