mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
fix(Hugging Face Inference Model Node, Embeddings Hugging Face Inference Node): Fix credential validation for HF nodes and add provider for (#18047)
This commit is contained in:
@@ -55,7 +55,7 @@ export class LmOpenHuggingFaceInference implements INodeType {
|
||||
displayName: 'Model',
|
||||
name: 'model',
|
||||
type: 'string',
|
||||
default: 'gpt2',
|
||||
default: 'mistralai/Mistral-Nemo-Base-2407',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
@@ -139,6 +139,11 @@ export class LmOpenHuggingFaceInference implements INodeType {
|
||||
const modelName = this.getNodeParameter('model', itemIndex) as string;
|
||||
const options = this.getNodeParameter('options', itemIndex, {}) as object;
|
||||
|
||||
// LangChain does not yet support specifying Provider
|
||||
// That's why mistral's model is the default value
|
||||
// It is one of the few models that seem to work out of the box
|
||||
// Other models are returning "Model x/y is not supported for task text-generation and provider z. Supported task: conversational."
|
||||
// https://github.com/langchain-ai/langchainjs/discussions/8434#discussioncomment-13603787
|
||||
const model = new HuggingFaceInference({
|
||||
model: modelName,
|
||||
apiKey: credentials.apiKey as string,
|
||||
|
||||
Reference in New Issue
Block a user