@n8n/n8n-nodes-langchain
Version:
49 lines • 1.72 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NvidiaApi = void 0;
class NvidiaApi {
constructor() {
this.name = 'nvidiaApi';
this.displayName = 'NVIDIA Nemotron';
this.documentationUrl = 'nvidia';
this.properties = [
{
displayName: 'Base URL',
name: 'url',
type: 'string',
required: true,
default: 'https://integrate.api.nvidia.com/v1',
description: 'Use the default for build.nvidia.com cloud, or change it to point at a self-hosted NIM container (e.g. http://localhost:8000/v1)',
},
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
required: false,
default: '',
description: 'Required for build.nvidia.com cloud. Leave blank for a self-hosted NIM that does not require authentication',
},
];
this.authenticate = async (credentials, requestOptions) => {
if (!credentials.apiKey) {
return requestOptions;
}
return {
...requestOptions,
headers: {
...requestOptions.headers,
Authorization: `Bearer ${credentials.apiKey}`,
},
};
};
this.test = {
request: {
baseURL: '={{ $credentials.url }}',
url: '/models',
},
};
}
}
exports.NvidiaApi = NvidiaApi;
//# sourceMappingURL=NvidiaApi.credentials.js.map