diff --git a/libs/langchain-community/src/llms/layerup_security.ts b/libs/langchain-community/src/llms/layerup_security.ts index e60676094892..5d84e7188add 100644 --- a/libs/langchain-community/src/llms/layerup_security.ts +++ b/libs/langchain-community/src/llms/layerup_security.ts @@ -1,7 +1,7 @@ import { LLM, BaseLLM, - type BaseLLMParams, + type BaseLLMCallOptions, } from "@langchain/core/language_models/llms"; import { GuardrailResponse, @@ -9,7 +9,7 @@ import { LLMMessage, } from "@layerup/layerup-security"; -export interface LayerupSecurityOptions extends BaseLLMParams { +export interface LayerupSecurityOptions extends BaseLLMCallOptions { llm: BaseLLM; layerupApiKey?: string; layerupApiBaseUrl?: string; @@ -101,7 +101,7 @@ export class LayerupSecurity extends LLM { return "layerup_security"; } - async _call(input: string, options?: BaseLLMParams): Promise { + async _call(input: string, options?: BaseLLMCallOptions): Promise { // Since LangChain LLMs only support string inputs, we will wrap each call to Layerup in a single-message // array of messages, then extract the string element when we need to access it. let messages: LLMMessage[] = [ diff --git a/libs/langchain-community/src/llms/tests/layerup_security.test.ts b/libs/langchain-community/src/llms/tests/layerup_security.test.ts index 670a56ca200b..883dca6fd0cb 100644 --- a/libs/langchain-community/src/llms/tests/layerup_security.test.ts +++ b/libs/langchain-community/src/llms/tests/layerup_security.test.ts @@ -1,5 +1,8 @@ import { test } from "@jest/globals"; -import { LLM, type BaseLLMParams } from "@langchain/core/language_models/llms"; +import { + LLM, + type BaseLLMCallOptions, +} from "@langchain/core/language_models/llms"; import { GuardrailResponse } from "@layerup/layerup-security/types.js"; import { LayerupSecurity, @@ -18,7 +21,7 @@ export class MockLLM extends LLM { return "mock_llm"; } - async _call(_input: string, _options?: BaseLLMParams): Promise { + async _call(_input: string, _options?: BaseLLMCallOptions): Promise { return "Hi Bob! How are you?"; } }