mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Update BaseChatModel import checks for MistralAI compatibility (#8527)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import type { IExecuteFunctions } from 'n8n-workflow';
|
||||
import { BaseChatModel } from 'langchain/chat_models/base';
|
||||
import { BaseChatModel as BaseChatModelCore } from '@langchain/core/language_models/chat_models';
|
||||
|
||||
export function getMetadataFiltersValues(
|
||||
ctx: IExecuteFunctions,
|
||||
@@ -14,3 +16,8 @@ export function getMetadataFiltersValues(
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// TODO: Remove this function once langchain package is updated to 0.1.x
|
||||
export function isChatInstance(model: any): model is BaseChatModel | BaseChatModelCore {
|
||||
return model instanceof BaseChatModel || model instanceof BaseChatModelCore;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user