Skip to content

ResolvedExtractor

An Extractor with function-form instructions/schema resolved to concrete values.

  • Omit<Extractor<T>, "instructions" | "schema">
Type Parameter Default type

T

unknown

readonly includePrevious: boolean;

Include the previously extracted value in the prompt. Default true.

Omit.includePrevious

instructions: string;

readonly name: string;
Omit.name

readonly optional onExtracted?: (c) => void | T | Promise<void | T>;

Interceptor: returning a value replaces it before persistence; throwing records a per-slug failure.

Parameter Type

c

ExtractorOnExtractedContext<T>

void | T | Promise<void | T>

Omit.onExtracted

readonly persist: boolean;

Persist to PersistentMemoryStore. false = emit + run onExtracted only. Default true.

Omit.persist

schema: ZodType<T>;

readonly scope: MemoryBlockScope;
Omit.scope

readonly slug: string;

Derived from name via slugifyExtractorName.

Omit.slug