@@ -75,7 +75,10 @@ export function loadModel<S extends ModelDescriptor>(
7575 * @overloadLabel "Load new model"
7676 * @param options - An object that defines all configuration parameters required for loading the model, including:
7777 * - modelSrc: The location from which the model weights are fetched (local path, remote URL, or Hyperdrive URL)
78- * - modelType: The type of model ("llm", "whisper", "embeddings", "nmt", or "tts")
78+ * - modelType: The canonical type of model ("llamacpp-completion",
79+ * "whispercpp-transcription", "llamacpp-embedding", "nmtcpp-translation",
80+ * "tts-ggml", ...). May be omitted when `modelSrc` is a registry descriptor
81+ * that already carries the engine.
7982 * - modelConfig: Model-specific configuration options (companion sources, model parameters, etc.)
8083 * - onProgress: Callback for download progress updates
8184 * - logger: Logger instance for model operation logs
@@ -92,27 +95,27 @@ export function loadModel<S extends ModelDescriptor>(
9295 * // Local file path - absolute path
9396 * const localModelId = await loadModel({
9497 * modelSrc: "/home/user/models/llama-7b.gguf",
95- * modelType: "llm ",
98+ * modelType: "llamacpp-completion ",
9699 * modelConfig: { ctx_size: 2048 }
97100 * });
98101 *
99102 * // Local file path - relative path
100103 * const relativeModelId = await loadModel({
101104 * modelSrc: "./models/whisper-base.gguf",
102- * modelType: "whisper "
105+ * modelType: "whispercpp-transcription "
103106 * });
104107 *
105108 * // Hyperdrive URL with key and path
106109 * const hyperdriveId = await loadModel({
107110 * modelSrc: "pear://<hyperdrive-key>/llama-7b.gguf",
108- * modelType: "llm ",
111+ * modelType: "llamacpp-completion ",
109112 * modelConfig: { ctx_size: 2048 }
110113 * });
111114 *
112115 * // Remote HTTP/HTTPS URL with progress tracking
113116 * const remoteId = await loadModel({
114117 * modelSrc: "https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q4_K_M.gguf",
115- * modelType: "llm ",
118+ * modelType: "llamacpp-completion ",
116119 * onProgress: (progress) => {
117120 * console.log(`Downloaded: ${progress.percentage}%`);
118121 * }
@@ -121,7 +124,7 @@ export function loadModel<S extends ModelDescriptor>(
121124 * // Multimodal model with projection
122125 * const multimodalId = await loadModel({
123126 * modelSrc: "https://huggingface.co/.../main-model.gguf",
124- * modelType: "llm ",
127+ * modelType: "llamacpp-completion ",
125128 * modelConfig: {
126129 * ctx_size: 512,
127130 * projectionModelSrc: "https://huggingface.co/.../projection-model.gguf"
@@ -134,7 +137,7 @@ export function loadModel<S extends ModelDescriptor>(
134137 * // Whisper with VAD model
135138 * const whisperId = await loadModel({
136139 * modelSrc: "https://huggingface.co/.../whisper-model.gguf",
137- * modelType: "whisper ",
140+ * modelType: "whispercpp-transcription ",
138141 * modelConfig: {
139142 * mode: "caption",
140143 * output_format: "plaintext",
@@ -150,7 +153,7 @@ export function loadModel<S extends ModelDescriptor>(
150153 *
151154 * const modelId = await loadModel({
152155 * modelSrc: "/path/to/model.gguf",
153- * modelType: "llm ",
156+ * modelType: "llamacpp-completion ",
154157 * logger // Pass logger in options
155158 * });
156159 * ```
0 commit comments