HuggingFace API Credential (credentials/HuggingFaceApi.credential.ts)

Flowise · packages/components/credentials/HuggingFaceApi.credential.ts · typescript · Apache-2.0
auth, ai, integration

Credential node that stores a HuggingFace API key for use by integration nodes accessing HuggingFace services.

// Source: https://github.com/FlowiseAI/Flowise | License: Apache-2.0 | Copyright 2023-present FlowiseAI, Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { INodeParams, INodeCredential } from '../src/Interface'

class HuggingFaceApi implements INodeCredential {
    label: string
    name: string
    version: number
    inputs: INodeParams[]

    constructor() {
        this.label = 'HuggingFace API'
        this.name = 'huggingFaceApi'
        this.version = 1.0
        this.inputs = [
            {
                label: 'HuggingFace Api Key',
                name: 'huggingFaceApiKey',
                type: 'password'
            }
        ]
    }
}

module.exports = { credClass: HuggingFaceApi }

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key