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), ); }