mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 11:01:18 +03:00
lint-fix
This commit is contained in:
+3
-6
@@ -1,4 +1,4 @@
|
|||||||
import { GoogleVertexAIEmbeddings, GoogleVertexAIEmbeddingsParams} from "langchain/embeddings/googlevertexai";
|
import { GoogleVertexAIEmbeddings, GoogleVertexAIEmbeddingsParams } from 'langchain/embeddings/googlevertexai'
|
||||||
import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Interface'
|
import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Interface'
|
||||||
import { getBaseClasses } from '../../../src/utils'
|
import { getBaseClasses } from '../../../src/utils'
|
||||||
|
|
||||||
@@ -14,7 +14,6 @@ class GoogleVertexAIEmbedding_Embeddings implements INode {
|
|||||||
credential: INodeParams
|
credential: INodeParams
|
||||||
inputs: INodeParams[]
|
inputs: INodeParams[]
|
||||||
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.label = 'GoogleVertexAI Embeddings'
|
this.label = 'GoogleVertexAI Embeddings'
|
||||||
this.name = 'googlevertexaiEmbeddings'
|
this.name = 'googlevertexaiEmbeddings'
|
||||||
@@ -35,20 +34,18 @@ class GoogleVertexAIEmbedding_Embeddings implements INode {
|
|||||||
name: 'textembedding-gecko'
|
name: 'textembedding-gecko'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
default: 'textembedding-gecko',
|
default: 'textembedding-gecko'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
||||||
|
|
||||||
const model = nodeData.inputs?.modelName as string
|
const model = nodeData.inputs?.modelName as string
|
||||||
const obj: GoogleVertexAIEmbeddingsParams = {
|
const obj: GoogleVertexAIEmbeddingsParams = {
|
||||||
model
|
model
|
||||||
}
|
}
|
||||||
|
|
||||||
const embedding = new GoogleVertexAIEmbeddings(obj);
|
const embedding = new GoogleVertexAIEmbeddings(obj)
|
||||||
return embedding
|
return embedding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user