Chore: Update @langchain/community (#3787)

* update package versions

* fix updated field defs due to lib update

* Merge branch 'main' into chore/Upgrade-LC-version

# Conflicts:
#	packages/components/package.json
#	pnpm-lock.yaml

* lintfix

* fix follow up prompt dialog

* lintfix

---------

Co-authored-by: Henry <hzj94@hotmail.com>
This commit is contained in:
Light
2025-01-15 03:30:51 +11:00
committed by GitHub
parent 16aa3a0d29
commit cc87d85675
6 changed files with 513 additions and 204 deletions
@@ -1,6 +1,6 @@
import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Interface'
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
import { JinaEmbeddings, JinaEmbeddingsParams } from '@langchain/community/embeddings/jina'
import { JinaEmbeddings } from '@langchain/community/embeddings/jina'
class JinaAIEmbedding_Embeddings implements INode {
label: string
@@ -45,12 +45,11 @@ class JinaAIEmbedding_Embeddings implements INode {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const apiKey = getCredentialParam('jinaAIAPIKey', credentialData, nodeData)
const obj: JinaEmbeddingsParams = {
const model = new JinaEmbeddings({
apiKey: apiKey,
model: modelName
}
})
const model = new JinaEmbeddings(obj)
return model
}
}
+3 -3
View File
@@ -41,14 +41,14 @@
"@langchain/aws": "0.1.2",
"@langchain/baidu-qianfan": "^0.1.0",
"@langchain/cohere": "^0.0.7",
"@langchain/community": "^0.3.11",
"@langchain/core": "0.3.18",
"@langchain/community": "^0.3.24",
"@langchain/core": "0.3.29",
"@langchain/exa": "^0.0.5",
"@langchain/google-genai": "0.1.3",
"@langchain/google-vertexai": "^0.1.2",
"@langchain/groq": "0.1.2",
"@langchain/langgraph": "^0.0.22",
"@langchain/mistralai": "^0.0.26",
"@langchain/mistralai": "^0.2.0",
"@langchain/mongodb": "^0.0.1",
"@langchain/ollama": "0.1.2",
"@langchain/openai": "0.3.13",
@@ -96,6 +96,7 @@ export const generateFollowUpPrompts = async (
model: providerConfig.modelName,
temperature: parseFloat(`${providerConfig.temperature}`)
})
// @ts-ignore
const structuredLLM = model.withStructuredOutput(FollowUpPromptType)
const structuredResponse = await structuredLLM.invoke(followUpPromptsPrompt)
return structuredResponse