@lacspace/moderation
Keyless content-safety guardrails for AI apps — detect & redact PII, flag toxic content, catch prompt-injection, and validate LLM output before you show or store it. Zero-dependency and isomorphic.
npm i @lacspace/moderationKeywords
More in AI App Kit
A tiny, provider-agnostic, keyless embeddings client plus pure vector math (cosine, dot, euclidean, mean-pool, top-k) — the entry point of the RAG stack. Calls OpenAI-compatible, Ollama, Google and Cohere endpoints through an injectable fetch.
@lacspace/vectorA tiny in-memory vector store for RAG and semantic search — upsert embeddings, run brute-force k-NN queries with cosine/dot/euclidean metrics, metadata filtering and JSON persistence. Zero dependencies.
@lacspace/ragThe glue of a RAG pipeline — index documents and retrieve + assemble prompt context by composing an injected embedder, vector store and splitter, with zero hard dependencies.
@lacspace/agentA tiny, keyless tool-calling / ReAct agent loop — inject any chat model and any tools as duck-typed interfaces and it drives the reason→act→observe loop with a full trace, maxSteps guard and error recovery.
@lacspace/memoryKeyless, zero-dependency conversation memory for LLM chat apps — track history, keep it inside a token/message budget with a sliding window, and optionally summarize old turns via an injected summarizer.
@lacspace/evalKeyless, zero-dependency toolkit for evaluating LLM outputs — deterministic scorers (contains, regex, JSON-schema, Levenshtein, cosine, keyword coverage, JSONPath) plus an optional LLM-as-judge whose model you inject, with batch runs and pass-rate reports.