본문으로 건너뛰기
문서/ko/docs/integrations/ai-context/
문서 둘러보기

연동 · AI 컨텍스트

AI와 LLM 컨텍스트 보호

애플리케이션이 모델로 보낼 텍스트를 조립하지만 프로토콜 전용 어댑터가 필요하지 않을 때 이 경계를 사용하세요.

01 · AI Context

설치

패키지는 지원하는 텍스트 값을 탐색하고 모든 탐지 판단을 코어에 위임합니다.

npm install @redact-secret/core@0.1.0-beta.13 @redact-secret/adapter-ai-context@0.1.4

02 · AI Context

컨텍스트 만들기

변환은 전부 성공하거나 전부 실패합니다. 지원하지 않는 바이너리와 인코딩 콘텐츠는 결과를 막으며, 모델 출력은 이 입력 경계 밖입니다.

import { createAiContextBoundary } from "@redact-secret/adapter-ai-context";

const boundary = await createAiContextBoundary();
const outcome = boundary.buildContext([
  { role: "user", text: "API_KEY=SYNTHETIC_REVOKED_VALUE" },
]);
if (outcome.outcome !== "ok") throw new Error(outcome.outcome);
sendToModel(outcome.value);