From 3021031eaa753374679230940ab89a36a04e53cd Mon Sep 17 00:00:00 2001 From: Milan Gallas Date: Thu, 12 Dec 2024 12:16:37 +0100 Subject: [PATCH] feat(instrumentation): move condition order Signed-off-by: Milan Gallas --- src/instrumentation/helpers/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/instrumentation/helpers/utils.ts b/src/instrumentation/helpers/utils.ts index a48a6830..7b571d25 100644 --- a/src/instrumentation/helpers/utils.ts +++ b/src/instrumentation/helpers/utils.ts @@ -22,8 +22,8 @@ export function assertLLMWithMessagesToPromptFn(instance: object): instance is B messagesToPrompt: BAMChatLLMInputConfig["messagesToPrompt"]; } { return Boolean( - "messagesToPrompt" in instance && - isFunction(instance.messagesToPrompt) && - instance instanceof BaseLLM, + instance instanceof BaseLLM && + "messagesToPrompt" in instance && + isFunction(instance.messagesToPrompt), ); }