Skip to content
1 min read · 70 words

Type Alias: CreateTransformersJsGenerationProcessor ​

ts
type CreateTransformersJsGenerationProcessor = (input: {
  model: string;
  onInitProgress?: TransformersJsGenerationProgressCallback;
}) => Promise<TransformersJsGenerationProcessor>;

Defined in: src/batteries/generation/transformers_js/types.ts:155

Factory for lazily creating the Janus chat/image processor. Defaults to a dynamic import of @huggingface/transformers + AutoProcessor.from_pretrained(model, …); override to inject a pre-built processor or a test double.

Parameters ​

ParameterType
input{ model: string; onInitProgress?: TransformersJsGenerationProgressCallback; }
input.modelstring
input.onInitProgress?TransformersJsGenerationProgressCallback

Returns ​

Promise<TransformersJsGenerationProcessor>