agsamantha/node_modules/@langchain/community/dist/llms/layerup_security.d.ts

31 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-10-02 20:15:21 +00:00
import { LLM, BaseLLM, type BaseLLMCallOptions } from "@langchain/core/language_models/llms";
import { GuardrailResponse, LLMMessage } from "@layerup/layerup-security";
export interface LayerupSecurityOptions extends BaseLLMCallOptions {
llm: BaseLLM;
layerupApiKey?: string;
layerupApiBaseUrl?: string;
promptGuardrails?: string[];
responseGuardrails?: string[];
mask?: boolean;
metadata?: Record<string, unknown>;
handlePromptGuardrailViolation?: (violation: GuardrailResponse) => LLMMessage;
handleResponseGuardrailViolation?: (violation: GuardrailResponse) => LLMMessage;
}
export declare class LayerupSecurity extends LLM {
static lc_name(): string;
lc_serializable: boolean;
llm: BaseLLM;
layerupApiKey: string;
layerupApiBaseUrl: string;
promptGuardrails: string[];
responseGuardrails: string[];
mask: boolean;
metadata: Record<string, unknown>;
handlePromptGuardrailViolation: (violation: GuardrailResponse) => LLMMessage;
handleResponseGuardrailViolation: (violation: GuardrailResponse) => LLMMessage;
private layerup;
constructor(options: LayerupSecurityOptions);
_llmType(): string;
_call(input: string, options?: BaseLLMCallOptions): Promise<string>;
}