/** What a local model takes and returns. The kind decides which server * script runs it, which route serves it, and which stdlib function calls * it. What a model is good for (coding, reasoning, illustration) is not a * kind; that is a tag on its catalog entry. */ export type ModelKind = "chat" | "embedding" | "speech" | "image" | "vision" | "controlnet"; /** In the order `list` shows them. */ export declare const MODEL_KINDS: ModelKind[]; /** The class a diffusers ControlNet directory names in its config.json. A * ControlNet is not served: an image server loads it from * `client.controlnetsDir` when a request names it. */ export declare const CONTROLNET_CLASS = "ControlNetModel"; export declare function isModelKind(value: unknown): value is ModelKind; /** What TypeScript knows about a vision family the server runs through * transformers. `tryIt` is the std::vision function the serve banner * suggests trying first: one the family answers. */ export type VisionFamily = { tryIt: "tagImage" | "detectObjects" | "embedImage"; }; /** The vision families the server runs through transformers, keyed by the * first of `architectures` in their config.json. The keys are copied from * `FAMILIES` in `lib/cli/visionRules.py`, and a test checks the two agree. * The ONNX tagger family has no config and is known by its files * instead. */ export declare const VISION_FAMILIES: Record; export declare const VISION_ARCHITECTURES: string[]; /** The two files that mark the WD14 tagger family. */ export declare const VISION_ONNX_FILES: string[]; /** What is in a model directory, read once for every rule. A missing file, * or one that is not JSON, is null. `modelDirKind.ts` reads them. */ export type DirFacts = { names: string[]; config: Record | null; diffusers: boolean; }; export declare function architecture(config: Record | null): string; /** What kind of model a directory holds, from what is in it, or null when * no rule matches. This is the one place a kind is decided from files: * `serve`, `list`, and `download` all come here, through * `kindOfModelDir` in `modelDirKind.ts`. A `.gguf` file's parent * directory counts as holding a chat model. */ export declare function kindOfFacts(facts: DirFacts): ModelKind | null; /** Architectures validated for chat with images through serve --vlm. */ export declare const VLM_ARCHITECTURES: string[];