mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Feature/nim container (#3966)
* add nim container setup * check if image or container exist before pulling * update NIM dialog * update chat nvidia api key * update nim container version * update nim container version
This commit is contained in:
@@ -16,10 +16,10 @@ class ChatNvdiaNIM_ChatModels implements INode {
|
||||
inputs: INodeParams[]
|
||||
|
||||
constructor() {
|
||||
this.label = 'Chat Nvdia NIM'
|
||||
this.name = 'chatNvdiaNIM'
|
||||
this.label = 'Chat Nvidia NIM'
|
||||
this.name = 'chatNvidiaNIM'
|
||||
this.version = 1.0
|
||||
this.type = 'ChatNvdiaNIM'
|
||||
this.type = 'ChatNvidiaNIM'
|
||||
this.icon = 'nvdia.svg'
|
||||
this.category = 'Chat Models'
|
||||
this.description = 'Wrapper around Nvdia NIM Inference API'
|
||||
@@ -28,7 +28,7 @@ class ChatNvdiaNIM_ChatModels implements INode {
|
||||
label: 'Connect Credential',
|
||||
name: 'credential',
|
||||
type: 'credential',
|
||||
credentialNames: ['nvdiaNIMApi'],
|
||||
credentialNames: ['nvidiaNIMApi'],
|
||||
optional: true
|
||||
}
|
||||
this.inputs = [
|
||||
@@ -44,6 +44,13 @@ class ChatNvdiaNIM_ChatModels implements INode {
|
||||
type: 'string',
|
||||
placeholder: 'microsoft/phi-3-mini-4k-instruct'
|
||||
},
|
||||
{
|
||||
label: 'Base Path',
|
||||
name: 'basePath',
|
||||
type: 'string',
|
||||
description: 'Specify the URL of the deployed NIM Inference API',
|
||||
placeholder: 'https://integrate.api.nvidia.com/v1'
|
||||
},
|
||||
{
|
||||
label: 'Temperature',
|
||||
name: 'temperature',
|
||||
@@ -52,13 +59,6 @@ class ChatNvdiaNIM_ChatModels implements INode {
|
||||
default: 0.9,
|
||||
optional: true
|
||||
},
|
||||
{
|
||||
label: 'Base Path',
|
||||
name: 'basePath',
|
||||
type: 'string',
|
||||
description: 'Specify the URL of the deployed NIM Inference API',
|
||||
placeholder: 'https://integrate.api.nvidia.com/v1'
|
||||
},
|
||||
{
|
||||
label: 'Streaming',
|
||||
name: 'streaming',
|
||||
@@ -131,12 +131,12 @@ class ChatNvdiaNIM_ChatModels implements INode {
|
||||
const cache = nodeData.inputs?.cache as BaseCache
|
||||
|
||||
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
||||
const nvdiaNIMApiKey = getCredentialParam('nvdiaNIMApiKey', credentialData, nodeData)
|
||||
const nvidiaNIMApiKey = getCredentialParam('nvidiaNIMApiKey', credentialData, nodeData)
|
||||
|
||||
const obj: ChatOpenAIFields & { nvdiaNIMApiKey?: string } = {
|
||||
temperature: parseFloat(temperature),
|
||||
modelName,
|
||||
openAIApiKey: nvdiaNIMApiKey,
|
||||
openAIApiKey: nvidiaNIMApiKey ?? 'sk-',
|
||||
streaming: streaming ?? true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user