SYMBOL INDEX (629 symbols across 60 files) FILE: examples/abort-reload/src/get_started.js function setLabel (line 6) | function setLabel(id, text) { function main (line 14) | async function main() { FILE: examples/cache-usage/src/cache_usage.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function main (line 15) | async function main() { FILE: examples/chrome-extension-webgpu-service-worker/src/popup.ts function enableInputs (line 56) | function enableInputs() { function handleClick (line 87) | async function handleClick() { function updateAnswer (line 120) | function updateAnswer(answer: string) { function fetchPageContents (line 149) | function fetchPageContents() { FILE: examples/chrome-extension/src/popup.ts function setLabel (line 18) | function setLabel(id: string, text: string) { function getElementAndCheck (line 25) | function getElementAndCheck(id: string): HTMLElement { function enableInputs (line 99) | function enableInputs() { function handleClick (line 145) | async function handleClick() { function handleSelectChange (line 194) | async function handleSelectChange() { function updateAnswer (line 260) | function updateAnswer(answer: string) { function fetchPageContents (line 289) | function fetchPageContents() { FILE: examples/embeddings/src/embeddings.ts function setLabel (line 12) | function setLabel(id: string, text: string) { class WebLLMEmbeddings (line 25) | class WebLLMEmbeddings implements EmbeddingsInterface { method constructor (line 28) | constructor(engine: webllm.MLCEngineInterface, modelId: string) { method _embed (line 33) | async _embed(texts: string[]): Promise { method embedQuery (line 45) | async embedQuery(document: string): Promise { method embedDocuments (line 49) | async embedDocuments(documents: string[]): Promise { function webllmAPI (line 72) | async function webllmAPI() { function langchainAPI (line 112) | async function langchainAPI() { function simpleRAG (line 160) | async function simpleRAG() { FILE: examples/function-calling/function-calling-manual/src/function_calling_manual.ts function setLabel (line 5) | function setLabel(id: string, text: string) { function hermes2_example (line 18) | async function hermes2_example() { function llama3_1_example (line 86) | async function llama3_1_example() { FILE: examples/function-calling/function-calling-openai/src/function_calling_openai.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function main (line 11) | async function main() { FILE: examples/get-started-latency-breakdown/src/get_started_latency_breakdown.ts function setLabel (line 3) | function setLabel(id: string, text: string) { type LatencyBreakdown (line 11) | type LatencyBreakdown = { function computeStats (line 19) | function computeStats( function main (line 43) | async function main() { FILE: examples/get-started-web-worker/src/main.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function mainNonStreaming (line 16) | async function mainNonStreaming() { function mainStreaming (line 55) | async function mainStreaming() { FILE: examples/get-started/src/get_started.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function main (line 11) | async function main() { FILE: examples/json-mode/src/json_mode.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function main (line 11) | async function main() { FILE: examples/json-schema/src/json_schema.ts function setLabel (line 4) | function setLabel(id: string, text: string) { function simpleStructuredTextExample (line 12) | async function simpleStructuredTextExample() { function harryPotterExample (line 77) | async function harryPotterExample() { function functionCallingExample (line 150) | async function functionCallingExample() { function ebnfGrammarExample (line 228) | async function ebnfGrammarExample() { function main (line 281) | async function main() { FILE: examples/logit-processor/src/logit_processor.ts constant USE_WEB_WORKER (line 4) | const USE_WEB_WORKER = true; constant AUTOREGRESS_LIMIT (line 5) | const AUTOREGRESS_LIMIT = 32; function setLabel (line 7) | function setLabel(id: string, text: string) { function main (line 15) | async function main() { FILE: examples/logit-processor/src/my_logit_processor.ts class MyLogitProcessor (line 4) | class MyLogitProcessor implements webllm.LogitProcessor { method processLogits (line 7) | processLogits(logits: Float32Array): Float32Array { method processSampledToken (line 12) | processSampledToken(token: number): void { method resetState (line 17) | resetState(): void { FILE: examples/multi-models/src/main.ts function setLabel (line 11) | function setLabel(id: string, text: string) { function sequentialGeneration (line 50) | async function sequentialGeneration() { function parallelGeneration (line 88) | async function parallelGeneration() { FILE: examples/multi-round-chat/src/multi_round_chat.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function main (line 16) | async function main() { FILE: examples/next-simple-chat/src/pages/_app.tsx function App (line 4) | function App({ Component, pageProps }: AppProps) { FILE: examples/next-simple-chat/src/pages/_document.tsx function Document (line 3) | function Document() { FILE: examples/next-simple-chat/src/pages/api/hello.ts type Data (line 4) | type Data = { function handler (line 8) | function handler( FILE: examples/next-simple-chat/src/pages/index.tsx function Home (line 7) | function Home() { FILE: examples/next-simple-chat/src/utils/chat_ui.ts class ChatUI (line 7) | class ChatUI { method constructor (line 16) | constructor(engine: MLCEngineInterface) { method pushTask (line 24) | private pushTask(task: () => Promise) { method onGenerate (line 33) | async onGenerate( method onReset (line 47) | async onReset(clearMessages: () => void) { method asyncInitChat (line 61) | async asyncInitChat( method unloadChat (line 87) | private async unloadChat() { method asyncGenerate (line 95) | private async asyncGenerate( FILE: examples/qwen3/src/qwen3_example.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function streamResponse (line 12) | async function streamResponse( function main (line 34) | async function main() { FILE: examples/seed-to-reproduce/src/seed.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function main (line 17) | async function main() { FILE: examples/service-worker/src/main.ts function setLabel (line 23) | function setLabel(id: string, text: string) { function mainNonStreaming (line 36) | async function mainNonStreaming() { function mainStreaming (line 74) | async function mainStreaming() { FILE: examples/simple-chat-js/index.js function updateEngineInitProgressCallback (line 17) | function updateEngineInitProgressCallback(report) { function initializeWebLLMEngine (line 26) | async function initializeWebLLMEngine() { function streamingGenerating (line 36) | async function streamingGenerating(messages, onUpdate, onFinish, onError) { function onMessageSend (line 63) | function onMessageSend() { function appendMessage (line 108) | function appendMessage(message) { function updateLastMessage (line 127) | function updateLastMessage(content) { FILE: examples/simple-chat-ts/src/simple_chat.ts function getElementAndCheck (line 4) | function getElementAndCheck(id: string): HTMLElement { class ChatUI (line 12) | class ChatUI { method pushTask (line 131) | private pushTask(task: () => Promise) { method onGenerate (line 140) | private async onGenerate() { method onSelectChange (line 149) | private async onSelectChange(modelSelector: HTMLSelectElement) { method onReset (line 164) | private async onReset() { method appendMessage (line 177) | private appendMessage(kind, text) { method appendUserMessage (line 196) | private appendUserMessage(text: string) { method updateLastMessage (line 215) | private updateLastMessage(kind, text) { method resetChatHistory (line 238) | private resetChatHistory() { method asyncInitChat (line 253) | private async asyncInitChat() { method unloadChat (line 275) | private async unloadChat() { method asyncGenerate (line 283) | private async asyncGenerate() { FILE: examples/simple-chat-upload/src/simple_chat.ts function getElementAndCheck (line 4) | function getElementAndCheck(id: string): HTMLElement { class ChatUI (line 12) | class ChatUI { method pushTask (line 131) | private pushTask(task: () => Promise) { method onGenerate (line 140) | private async onGenerate() { method onSelectChange (line 149) | private async onSelectChange(modelSelector: HTMLSelectElement) { method onReset (line 164) | private async onReset() { method appendMessage (line 177) | private appendMessage(kind, text) { method updateLastMessage (line 195) | private updateLastMessage(kind, text) { method resetChatHistory (line 218) | private resetChatHistory() { method asyncInitChat (line 233) | private async asyncInitChat() { method unloadChat (line 255) | private async unloadChat() { method asyncGenerate (line 263) | private async asyncGenerate() { function getFileType (line 332) | function getFileType(file: File) { function uploadToIndexedDB (line 348) | async function uploadToIndexedDB(file: File) { function cacheFile (line 382) | async function cacheFile(file: File, response: Response) { function uploadFiles (line 392) | async function uploadFiles(): Promise { FILE: examples/streaming/src/streaming.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function main (line 14) | async function main() { FILE: examples/structural-tag-tool-use/src/mcp_structural_tag.ts type ToolInvocation (line 3) | type ToolInvocation = { type ToolDefinition (line 8) | type ToolDefinition = { function setLabel (line 66) | function setLabel(id: string, text: string) { function appendLog (line 74) | function appendLog(text: string) { function parseToolCallBlocks (line 82) | function parseToolCallBlocks( function runTool (line 104) | async function runTool(call: ToolInvocation): Promise { function imageURLToBase64 (line 21) | async function imageURLToBase64(url: string): Promise { FILE: examples/vision-model/src/vision_model.ts function setLabel (line 4) | function setLabel(id: string, text: string) { constant USE_WEB_WORKER (line 12) | const USE_WEB_WORKER = true; function main (line 20) | async function main() { FILE: src/cache_util.ts function findModelRecord (line 12) | function findModelRecord(modelId: string, appConfig?: AppConfig): ModelR... function hasModelInCache (line 22) | async function hasModelInCache( function deleteModelAllInfoInCache (line 35) | async function deleteModelAllInfoInCache( function deleteModelInCache (line 51) | async function deleteModelInCache( function deleteChatConfigInCache (line 73) | async function deleteChatConfigInCache( function deleteModelWasmInCache (line 93) | async function deleteModelWasmInCache( function asyncLoadTokenizer (line 119) | async function asyncLoadTokenizer( FILE: src/config.ts type ConvTemplateConfig (line 15) | interface ConvTemplateConfig { type Role (line 29) | enum Role { type MessagePlaceholders (line 45) | enum MessagePlaceholders { type TokenizerInfo (line 58) | interface TokenizerInfo { type ChatConfig (line 72) | interface ChatConfig { type ChatOptions (line 99) | interface ChatOptions extends Partial {} type MLCEngineConfig (line 111) | interface MLCEngineConfig { type GenerationConfig (line 126) | interface GenerationConfig { function postInitAndCheckGenerationConfigValues (line 148) | function postInitAndCheckGenerationConfigValues( type ModelType (line 232) | enum ModelType { type ModelRecord (line 255) | interface ModelRecord { type AppConfig (line 278) | interface AppConfig { FILE: src/conversation.ts type ImageURL (line 27) | type ImageURL = ChatCompletionContentPartImage.ImageURL; class Conversation (line 32) | class Conversation { method constructor (line 61) | constructor(config: ConvTemplateConfig, isTextCompletion = false) { method getPromptArrayInternal (line 67) | private getPromptArrayInternal( method getPromptArray (line 236) | getPromptArray(): Array> { method getPromptArrayLastRound (line 251) | getPromptArrayLastRound() { method getPromptArrayTextCompletion (line 264) | getPromptArrayTextCompletion(): Array { method reset (line 274) | reset() { method getStopStr (line 284) | getStopStr(): string[] { method getStopTokens (line 293) | getStopTokens() { method appendMessage (line 297) | appendMessage( method appendReplyHeader (line 318) | appendReplyHeader(role: Role) { method appendEmptyThinkingReplyHeader (line 328) | appendEmptyThinkingReplyHeader(role: Role, emptyThinkingBlockStr: stri... method finishReply (line 338) | finishReply(message: string) { function getConversation (line 358) | function getConversation( function compareConversationObject (line 378) | function compareConversationObject( function getConversationFromChatCompletionRequest (line 465) | function getConversationFromChatCompletionRequest( function getFunctionCallUsage (line 524) | function getFunctionCallUsage(request: ChatCompletionRequest): string { FILE: src/embedding.ts class EmbeddingPipeline (line 13) | class EmbeddingPipeline { method constructor (line 33) | constructor(tvm: tvmjs.Instance, tokenizer: Tokenizer, config: ChatCon... method embedStep (line 95) | async embedStep( method dispose (line 252) | dispose() { method sync (line 263) | async sync(): Promise { method asyncLoadWebGPUPipelines (line 268) | async asyncLoadWebGPUPipelines() { method getCurRoundEmbedTotalTime (line 277) | getCurRoundEmbedTotalTime(): number { method getCurRoundEmbedTotalTokens (line 284) | getCurRoundEmbedTotalTokens(): number { method getCurRoundEmbedTokensPerSec (line 291) | getCurRoundEmbedTokensPerSec(): number { FILE: src/engine.ts function CreateMLCEngine (line 90) | async function CreateMLCEngine( class MLCEngine (line 106) | class MLCEngine implements MLCEngineInterface { method constructor (line 141) | constructor(engineConfig?: MLCEngineConfig) { method setAppConfig (line 163) | setAppConfig(appConfig: AppConfig) { method setInitProgressCallback (line 167) | setInitProgressCallback(initProgressCallback?: InitProgressCallback) { method getInitProgressCallback (line 171) | getInitProgressCallback() { method setLogitProcessorRegistry (line 175) | setLogitProcessorRegistry( method setLogLevel (line 186) | setLogLevel(logLevel: LogLevel) { method reload (line 194) | async reload( method reloadInternal (line 239) | private async reloadInternal( method unload (line 412) | async unload() { method _generate (line 437) | private async _generate( method asyncGenerate (line 480) | async *asyncGenerate( method interruptGenerate (line 751) | async interruptGenerate() { method chatCompletion (line 776) | async chatCompletion( method completion (line 964) | async completion( method embedding (line 1084) | async embedding( method getMaxStorageBufferBindingSize (line 1136) | async getMaxStorageBufferBindingSize(): Promise { method getGPUVendor (line 1165) | async getGPUVendor(): Promise { method getLLMStates (line 1179) | private getLLMStates( method getEmbeddingStates (line 1190) | private getEmbeddingStates( method getModelStates (line 1209) | private getModelStates( method forwardTokensAndSample (line 1273) | async forwardTokensAndSample( method getMessage (line 1290) | async getMessage(modelId?: string): Promise { method runtimeStatsText (line 1295) | async runtimeStatsText(modelId?: string): Promise { method resetChat (line 1306) | async resetChat(keepStats = false, modelId?: string) { method prefill (line 1346) | async prefill( method decode (line 1409) | async decode(pipeline: LLMChatPipeline, genConfig?: GenerationConfig) { FILE: src/error.ts class ModelNotFoundError (line 1) | class ModelNotFoundError extends Error { method constructor (line 2) | constructor(modelId: string) { class ConfigValueError (line 10) | class ConfigValueError extends Error { method constructor (line 11) | constructor(message: string) { class MinValueError (line 17) | class MinValueError extends ConfigValueError { method constructor (line 18) | constructor(paramName: string, minValue: number) { class RangeError (line 24) | class RangeError extends ConfigValueError { method constructor (line 25) | constructor( class NonNegativeError (line 38) | class NonNegativeError extends ConfigValueError { method constructor (line 39) | constructor(paramName: string) { class InvalidNumberStringError (line 45) | class InvalidNumberStringError extends ConfigValueError { method constructor (line 46) | constructor(paramName: string, actualValue?: string) { class DependencyError (line 54) | class DependencyError extends ConfigValueError { method constructor (line 55) | constructor( class WebGPUNotAvailableError (line 67) | class WebGPUNotAvailableError extends Error { method constructor (line 68) | constructor() { class WebGPUNotFoundError (line 79) | class WebGPUNotFoundError extends Error { method constructor (line 80) | constructor() { class ModelNotLoadedError (line 86) | class ModelNotLoadedError extends Error { method constructor (line 87) | constructor(requestName: string) { class WorkerEngineModelNotLoadedError (line 97) | class WorkerEngineModelNotLoadedError extends Error { method constructor (line 98) | constructor(engineName: string) { class MessageOrderError (line 106) | class MessageOrderError extends Error { method constructor (line 107) | constructor(message: string) { class SystemMessageOrderError (line 113) | class SystemMessageOrderError extends Error { method constructor (line 114) | constructor() { class ContentTypeError (line 120) | class ContentTypeError extends Error { method constructor (line 121) | constructor(name: string) { class UnsupportedRoleError (line 127) | class UnsupportedRoleError extends Error { method constructor (line 128) | constructor(role: string) { class UserMessageContentErrorForNonVLM (line 134) | class UserMessageContentErrorForNonVLM extends Error { method constructor (line 135) | constructor(modelId: string, modelType: string, content: any) { class PrefillChunkSizeSmallerThanImageError (line 145) | class PrefillChunkSizeSmallerThanImageError extends Error { method constructor (line 146) | constructor(prefillChunkSize: number, imageEmbedSize: number) { class CannotFindImageEmbedError (line 156) | class CannotFindImageEmbedError extends Error { method constructor (line 157) | constructor() { class UnsupportedDetailError (line 166) | class UnsupportedDetailError extends Error { method constructor (line 167) | constructor(detail: string) { class UnsupportedImageURLError (line 175) | class UnsupportedImageURLError extends Error { method constructor (line 176) | constructor(url: string) { class MultipleTextContentError (line 184) | class MultipleTextContentError extends Error { method constructor (line 185) | constructor() { class ToolCallOutputParseError (line 193) | class ToolCallOutputParseError extends Error { method constructor (line 194) | constructor(outputMessage: string, error: Error) { class ToolCallOutputInvalidTypeError (line 203) | class ToolCallOutputInvalidTypeError extends Error { method constructor (line 204) | constructor(expectedType: string) { class ToolCallOutputMissingFieldsError (line 212) | class ToolCallOutputMissingFieldsError extends Error { method constructor (line 213) | constructor(missingFields: string[], object: any) { class ConfigurationNotInitializedError (line 221) | class ConfigurationNotInitializedError extends Error { method constructor (line 222) | constructor() { class MissingModelWasmError (line 230) | class MissingModelWasmError extends Error { method constructor (line 231) | constructor(modelId: string) { class FeatureSupportError (line 239) | class FeatureSupportError extends Error { method constructor (line 240) | constructor(feature: string) { class UnsupportedFieldsError (line 248) | class UnsupportedFieldsError extends Error { method constructor (line 249) | constructor(unsupportedFields: string[], targetClass: string) { class ShaderF16SupportError (line 258) | class ShaderF16SupportError extends FeatureSupportError { method constructor (line 259) | constructor() { class DeviceLostError (line 267) | class DeviceLostError extends Error { method constructor (line 268) | constructor() { class InvalidToolChoiceError (line 276) | class InvalidToolChoiceError extends Error { method constructor (line 277) | constructor(toolChoice: string) { class UnsupportedToolChoiceTypeError (line 285) | class UnsupportedToolChoiceTypeError extends Error { method constructor (line 286) | constructor() { class FunctionNotFoundError (line 294) | class FunctionNotFoundError extends Error { method constructor (line 295) | constructor(functionName: string) { class UnsupportedToolTypeError (line 303) | class UnsupportedToolTypeError extends Error { method constructor (line 304) | constructor() { class EngineNotLoadedError (line 309) | class EngineNotLoadedError extends Error { method constructor (line 310) | constructor() { class UnsupportedTokenizerFilesError (line 317) | class UnsupportedTokenizerFilesError extends Error { method constructor (line 318) | constructor(files: string[]) { class WindowSizeConfigurationError (line 324) | class WindowSizeConfigurationError extends Error { method constructor (line 325) | constructor(contextWindowSize: number, slidingWindowSize: number) { class AttentionSinkSizeError (line 335) | class AttentionSinkSizeError extends Error { method constructor (line 336) | constructor() { class WindowSizeSpecificationError (line 346) | class WindowSizeSpecificationError extends Error { method constructor (line 347) | constructor() { class ContextWindowSizeExceededError (line 356) | class ContextWindowSizeExceededError extends Error { method constructor (line 357) | constructor(numPromptTokens: number, contextWindowSize: number) { class NonWorkerEnvironmentError (line 367) | class NonWorkerEnvironmentError extends Error { method constructor (line 368) | constructor(className: string) { class NoServiceWorkerAPIError (line 374) | class NoServiceWorkerAPIError extends Error { method constructor (line 375) | constructor() { class ServiceWorkerInitializationError (line 384) | class ServiceWorkerInitializationError extends Error { method constructor (line 385) | constructor() { class StreamingCountError (line 394) | class StreamingCountError extends Error { method constructor (line 395) | constructor() { class SeedTypeError (line 401) | class SeedTypeError extends Error { method constructor (line 402) | constructor(seed: any) { class InvalidResponseFormatError (line 407) | class InvalidResponseFormatError extends Error { method constructor (line 408) | constructor() { class InvalidResponseFormatGrammarError (line 414) | class InvalidResponseFormatGrammarError extends Error { method constructor (line 415) | constructor() { class InvalidResponseFormatStructuralTagError (line 424) | class InvalidResponseFormatStructuralTagError extends Error { method constructor (line 425) | constructor() { class CustomResponseFormatError (line 434) | class CustomResponseFormatError extends Error { method constructor (line 435) | constructor(currentFormat: any) { class UnsupportedModelIdError (line 445) | class UnsupportedModelIdError extends Error { method constructor (line 446) | constructor(currentModelId: string, supportedModelIds: string[]) { class CustomSystemPromptError (line 454) | class CustomSystemPromptError extends Error { method constructor (line 455) | constructor() { class InvalidStreamOptionsError (line 463) | class InvalidStreamOptionsError extends Error { method constructor (line 464) | constructor() { class UnknownMessageKindError (line 469) | class UnknownMessageKindError extends Error { method constructor (line 470) | constructor(msgKind: string, msgContent: any) { class TextCompletionExpectsKVEmptyError (line 476) | class TextCompletionExpectsKVEmptyError extends Error { method constructor (line 477) | constructor() { class TextCompletionConversationExpectsPrompt (line 483) | class TextCompletionConversationExpectsPrompt extends Error { method constructor (line 484) | constructor() { class TextCompletionConversationError (line 492) | class TextCompletionConversationError extends Error { method constructor (line 493) | constructor(funcName: string) { class EmbeddingUnsupportedEncodingFormatError (line 499) | class EmbeddingUnsupportedEncodingFormatError extends Error { method constructor (line 500) | constructor() { class EmbeddingUnsupportedModelError (line 506) | class EmbeddingUnsupportedModelError extends Error { method constructor (line 507) | constructor(currentModel: string) { class EmbeddingSlidingWindowError (line 517) | class EmbeddingSlidingWindowError extends Error { method constructor (line 518) | constructor(sliding_window_size: number) { class EmbeddingChunkingUnsupportedError (line 527) | class EmbeddingChunkingUnsupportedError extends Error { method constructor (line 528) | constructor(contextWindowSize: number, prefillChunkSize: number) { class EmbeddingExceedContextWindowSizeError (line 538) | class EmbeddingExceedContextWindowSizeError extends Error { method constructor (line 539) | constructor(contextWindowSize: number, receivedSize: number) { class EmbeddingInputEmptyError (line 548) | class EmbeddingInputEmptyError extends Error { method constructor (line 549) | constructor() { class ReloadArgumentSizeUnmatchedError (line 555) | class ReloadArgumentSizeUnmatchedError extends Error { method constructor (line 556) | constructor(numModelId: number, numChatOpts: number) { class UnclearModelToUseError (line 565) | class UnclearModelToUseError extends Error { method constructor (line 566) | constructor(loadedModels: string[], requestName: string) { class SpecifiedModelNotFoundError (line 575) | class SpecifiedModelNotFoundError extends Error { method constructor (line 576) | constructor( class IncorrectPipelineLoadedError (line 590) | class IncorrectPipelineLoadedError extends Error { method constructor (line 591) | constructor( class ReloadModelIdNotUniqueError (line 604) | class ReloadModelIdNotUniqueError extends Error { method constructor (line 605) | constructor(modelId: string[]) { FILE: src/extension_service_worker.ts type ExtensionMLCEngineConfig (line 13) | interface ExtensionMLCEngineConfig extends MLCEngineConfig { class ServiceWorkerMLCEngineHandler (line 34) | class ServiceWorkerMLCEngineHandler extends WebWorkerMLCEngineHandler { method constructor (line 37) | constructor(port: chrome.runtime.Port) { method postMessage (line 43) | postMessage(msg: any) { method setPort (line 47) | setPort(port: chrome.runtime.Port) { method onPortDisconnect (line 52) | onPortDisconnect(port: chrome.runtime.Port) { method onmessage (line 58) | onmessage(event: any): void { function CreateServiceWorkerMLCEngine (line 118) | async function CreateServiceWorkerMLCEngine( class PortAdapter (line 132) | class PortAdapter implements ChatWorker { method constructor (line 136) | constructor(port: chrome.runtime.Port) { method handleMessage (line 142) | private handleMessage(message: any) { method onmessage (line 149) | get onmessage(): (message: any) => void { method onmessage (line 153) | set onmessage(listener: (message: any) => void) { class ServiceWorkerMLCEngine (line 166) | class ServiceWorkerMLCEngine extends WebWorkerMLCEngine { method constructor (line 170) | constructor(engineConfig?: ExtensionMLCEngineConfig, keepAliveMs = 100... FILE: src/llm_chat.ts type ImageURL (line 36) | type ImageURL = ChatCompletionContentPartImage.ImageURL; class LLMChatPipeline (line 38) | class LLMChatPipeline { method constructor (line 150) | constructor( method dispose (line 345) | dispose() { method getMessage (line 366) | getMessage() { method resetRuntimeStats (line 373) | resetRuntimeStats() { method resetChat (line 383) | resetChat(keepStats = false) { method resetKVCache (line 398) | resetKVCache() { method stopped (line 414) | stopped(): boolean { method getFinishReason (line 421) | getFinishReason(): ChatCompletionFinishReason | undefined { method getTokenLogprobArray (line 429) | getTokenLogprobArray(): Array { method getCurRoundDecodingTotalTokens (line 436) | getCurRoundDecodingTotalTokens(): number { method getCurRoundPrefillTotalTokens (line 443) | getCurRoundPrefillTotalTokens(): number { method getCurRoundDecodingTotalTime (line 450) | getCurRoundDecodingTotalTime(): number { method getCurRoundPrefillTotalTime (line 457) | getCurRoundPrefillTotalTime(): number { method getCurRoundGrammarInitTotalTime (line 464) | getCurRoundGrammarInitTotalTime(): number { method getCurRoundGrammarPerTokenTotalTime (line 472) | getCurRoundGrammarPerTokenTotalTime(): number { method getCurRoundLatencyBreakdown (line 479) | getCurRoundLatencyBreakdown(): LatencyBreakdown { method runtimeStatsText (line 486) | runtimeStatsText(): string { method curRoundRuntimeStatsText (line 496) | curRoundRuntimeStatsText(): string { method getCurRoundPrefillTokensPerSec (line 506) | getCurRoundPrefillTokensPerSec(): number { method getCurRoundDecodingTokensPerSec (line 513) | getCurRoundDecodingTokensPerSec(): number { method setSeed (line 520) | setSeed(seed: number): void { method getResponseFormatKey (line 524) | private getResponseFormatKey( method getConversationObject (line 552) | getConversationObject(): Conversation { method setConversation (line 559) | setConversation(newConv: Conversation) { method asyncLoadWebGPUPipelines (line 565) | async asyncLoadWebGPUPipelines() { method prefillStep (line 572) | async prefillStep( method decodeStep (line 763) | async decodeStep(genConfig?: GenerationConfig): Promise { method triggerStop (line 802) | triggerStop() { method processNextToken (line 819) | private processNextToken( method getTokensEmbeddings (line 921) | private getTokensEmbeddings(inputTokens: number[]): tvmjs.Tensor { method calculateResizeShape (line 946) | private calculateResizeShape( method calculateCropShape (line 966) | private calculateCropShape( method getImageEmbeddings (line 982) | private async getImageEmbeddings( method embedAndForward (line 1042) | private async embedAndForward( method updateLogitsOnCPU (line 1101) | private updateLogitsOnCPU(logits: tvmjs.Tensor): tvmjs.Tensor { method sampleTokenFromLogits (line 1115) | private async sampleTokenFromLogits( method getInputData (line 1522) | private getInputData(): [Array | ImageURL>, number] { method forwardTokensAndSample (line 1593) | async forwardTokensAndSample( method getTokenLogprob (line 1653) | private getTokenLogprob( method sync (line 1694) | async sync(): Promise { method evaluate (line 1699) | async evaluate() { FILE: src/message.ts type RequestKind (line 18) | type RequestKind = type ResponseKind (line 40) | type ResponseKind = "return" | "throw" | "initProgressCallback"; type ReloadParams (line 42) | interface ReloadParams { type ResetChatParams (line 46) | interface ResetChatParams { type GetMessageParams (line 50) | interface GetMessageParams { type RuntimeStatsTextParams (line 53) | interface RuntimeStatsTextParams { type ForwardTokensAndSampleParams (line 56) | interface ForwardTokensAndSampleParams { type ChatCompletionNonStreamingParams (line 73) | interface ChatCompletionNonStreamingParams { type ChatCompletionStreamInitParams (line 78) | interface ChatCompletionStreamInitParams { type CompletionNonStreamingParams (line 84) | interface CompletionNonStreamingParams { type CompletionStreamInitParams (line 89) | interface CompletionStreamInitParams { type EmbeddingParams (line 95) | interface EmbeddingParams { type CompletionStreamNextChunkParams (line 100) | interface CompletionStreamNextChunkParams { type CustomRequestParams (line 104) | interface CustomRequestParams { type MessageContent (line 108) | type MessageContent = type WorkerRequest (line 137) | type WorkerRequest = { type HeartbeatWorkerResponse (line 143) | type HeartbeatWorkerResponse = { type OneTimeWorkerResponse (line 148) | type OneTimeWorkerResponse = { type InitProgressWorkerResponse (line 154) | type InitProgressWorkerResponse = { type WorkerResponse (line 160) | type WorkerResponse = FILE: src/openai_api_protocols/chat_completion.ts class Chat (line 50) | class Chat { method constructor (line 54) | constructor(engine: MLCEngineInterface) { class Completions (line 60) | class Completions { method constructor (line 63) | constructor(engine: MLCEngineInterface) { method create (line 74) | create( type ChatCompletionRequestBase (line 91) | interface ChatCompletionRequestBase { type ChatCompletionRequestNonStreaming (line 289) | interface ChatCompletionRequestNonStreaming type ChatCompletionRequestStreaming (line 297) | interface ChatCompletionRequestStreaming type ChatCompletionRequest (line 305) | type ChatCompletionRequest = type ChatCompletion (line 312) | interface ChatCompletion { type ChatCompletionChunk (line 362) | interface ChatCompletionChunk { function postInitAndCheckFields (line 418) | function postInitAndCheckFields( type ChatCompletionContentPart (line 609) | type ChatCompletionContentPart = type ChatCompletionContentPartText (line 613) | interface ChatCompletionContentPartText { type ImageURL (line 626) | interface ImageURL { type ChatCompletionContentPartImage (line 639) | interface ChatCompletionContentPartImage { type ChatCompletionMessageToolCall (line 649) | interface ChatCompletionMessageToolCall { type Function (line 671) | interface Function { type ChatCompletionRole (line 690) | type ChatCompletionRole = type ChatCompletionStreamOptions (line 700) | interface ChatCompletionStreamOptions { type ChatCompletionSystemMessageParam (line 710) | interface ChatCompletionSystemMessageParam { type ChatCompletionUserMessageParam (line 722) | interface ChatCompletionUserMessageParam { type ChatCompletionAssistantMessageParam (line 742) | interface ChatCompletionAssistantMessageParam { type ChatCompletionToolMessageParam (line 767) | interface ChatCompletionToolMessageParam { type ChatCompletionMessageParam (line 784) | type ChatCompletionMessageParam = type FunctionParameters (line 801) | type FunctionParameters = Record; type FunctionDefinition (line 803) | interface FunctionDefinition { type ChatCompletionTool (line 828) | interface ChatCompletionTool { type ChatCompletionNamedToolChoice (line 841) | interface ChatCompletionNamedToolChoice { type Function (line 851) | interface Function { type ChatCompletionToolChoiceOption (line 870) | type ChatCompletionToolChoiceOption = type TopLogprob (line 878) | interface TopLogprob { type ChatCompletionTokenLogprob (line 901) | interface ChatCompletionTokenLogprob { type ChatCompletionMessage (line 935) | interface ChatCompletionMessage { type CompletionUsage (line 955) | interface CompletionUsage { type ChatCompletionFinishReason (line 1032) | type ChatCompletionFinishReason = type Choice (line 1039) | interface Choice { type Logprobs (line 1068) | interface Logprobs { type Choice (line 1078) | interface Choice { type Delta (line 1107) | interface Delta { type ToolCall (line 1122) | interface ToolCall { type Function (line 1142) | interface Function { type Logprobs (line 1162) | interface Logprobs { type ResponseFormat (line 1194) | interface ResponseFormat { FILE: src/openai_api_protocols/completion.ts class Completions (line 32) | class Completions { method constructor (line 35) | constructor(engine: MLCEngineInterface) { method create (line 46) | create( type CompletionCreateParamsBase (line 62) | interface CompletionCreateParamsBase { type CompletionCreateParams (line 248) | type CompletionCreateParams = type CompletionCreateParamsNonStreaming (line 252) | interface CompletionCreateParamsNonStreaming type CompletionCreateParamsStreaming (line 260) | interface CompletionCreateParamsStreaming type Completion (line 272) | interface Completion { type CompletionChoice (line 314) | interface CompletionChoice { function postInitAndCheckFields (line 347) | function postInitAndCheckFields( FILE: src/openai_api_protocols/embedding.ts class Embeddings (line 25) | class Embeddings { method constructor (line 28) | constructor(engine: MLCEngineInterface) { method create (line 35) | create(request: EmbeddingCreateParams): Promise void) { method postMessage (line 168) | postMessage(message: WorkerRequest) { function CreateServiceWorkerMLCEngine (line 192) | async function CreateServiceWorkerMLCEngine( class ServiceWorkerMLCEngine (line 218) | class ServiceWorkerMLCEngine extends WebWorkerMLCEngine { method constructor (line 221) | constructor(engineConfig?: MLCEngineConfig, keepAliveMs = 10000) { method onmessage (line 235) | onmessage(event: any): void { FILE: src/support.ts function getTopProbs (line 31) | function getTopProbs( function getTokenTableFromTokenizer (line 76) | function getTokenTableFromTokenizer(tokenizer: Tokenizer): string[] { function cleanModelUrl (line 90) | function cleanModelUrl(modelUrl: string): string { function getToolCallFromOutputMessage (line 137) | function getToolCallFromOutputMessage( function findModelRecord (line 206) | function findModelRecord( function getModelIdToUse (line 225) | function getModelIdToUse( function getChunkedPrefillInputData (line 283) | function getChunkedPrefillInputData( type Cont (line 359) | type Cont = () => void; class CustomLock (line 368) | class CustomLock { method acquire (line 372) | public async acquire(): Promise { method release (line 385) | public async release(): Promise { type ImageURL (line 406) | type ImageURL = ChatCompletionContentPartImage.ImageURL; constant IMAGE_EMBED_SIZE (line 409) | const IMAGE_EMBED_SIZE = 1921; function getImageDataFromURL (line 414) | async function getImageDataFromURL(url: string): Promise { function getRGBArrayFromImageData (line 433) | function getRGBArrayFromImageData( FILE: src/types.ts type InitProgressReport (line 22) | interface InitProgressReport { type InitProgressCallback (line 31) | type InitProgressCallback = (report: InitProgressReport) => void; type LogitProcessor (line 38) | interface LogitProcessor { type MLCEngineInterface (line 62) | interface MLCEngineInterface { constant LOG_LEVELS (line 245) | const LOG_LEVELS = { type LogLevel (line 253) | type LogLevel = keyof typeof LOG_LEVELS; type LatencyBreakdown (line 255) | type LatencyBreakdown = { FILE: src/utils.ts function areArraysEqual (line 4) | function areArraysEqual(arr1?: Array, arr2?: Array): boolean { function areObjectsEqual (line 15) | function areObjectsEqual(obj1: any, obj2: any): boolean { function areModelRecordsEqual (line 32) | function areModelRecordsEqual( function areAppConfigsEqual (line 71) | function areAppConfigsEqual( function areChatOptionsEqual (line 100) | function areChatOptionsEqual( function areChatOptionsListEqual (line 124) | function areChatOptionsListEqual( FILE: src/web_worker.ts class WebWorkerMLCEngineHandler (line 61) | class WebWorkerMLCEngineHandler { method constructor (line 84) | constructor() { method postMessage (line 100) | postMessage(msg: any) { method setLogitProcessorRegistry (line 105) | setLogitProcessorRegistry( method handleTask (line 111) | async handleTask( method onmessage (line 134) | onmessage( method reloadIfUnmatched (line 364) | async reloadIfUnmatched( type ChatWorker (line 380) | interface ChatWorker { function CreateWebWorkerMLCEngine (line 401) | async function CreateWebWorkerMLCEngine( class WebWorkerMLCEngine (line 422) | class WebWorkerMLCEngine implements MLCEngineInterface { method constructor (line 443) | constructor(worker: ChatWorker, engineConfig?: MLCEngineConfig) { method setInitProgressCallback (line 469) | setInitProgressCallback(initProgressCallback?: InitProgressCallback) { method getInitProgressCallback (line 473) | getInitProgressCallback(): InitProgressCallback | undefined { method setAppConfig (line 477) | setAppConfig(appConfig: AppConfig) { method setLogLevel (line 486) | setLogLevel(logLevel: LogLevel) { method getPromise (line 496) | protected getPromise( method reload (line 522) | async reload( method getMaxStorageBufferBindingSize (line 547) | async getMaxStorageBufferBindingSize(): Promise { method getGPUVendor (line 556) | async getGPUVendor(): Promise { method getMessage (line 565) | async getMessage(modelId?: string): Promise { method runtimeStatsText (line 576) | async runtimeStatsText(modelId?: string): Promise { method interruptGenerate (line 587) | interruptGenerate(): void { method unload (line 596) | async unload(): Promise { method resetChat (line 607) | async resetChat(keepStats = false, modelId?: string): Promise { method forwardTokensAndSample (line 619) | async forwardTokensAndSample( method asyncGenerate (line 647) | async *asyncGenerate( method chatCompletion (line 677) | async chatCompletion( method completion (line 736) | async completion( method embedding (line 786) | async embedding( method onmessage (line 804) | onmessage(event: any) { FILE: tests/cache_util.test.ts class BaseCache (line 20) | class BaseCache { method constructor (line 21) | constructor(private name: string) {} method deleteInCache (line 22) | async deleteInCache(url: string) { method fetchWithCache (line 25) | async fetchWithCache(url: string, format: string) { FILE: tests/conversation.test.ts type ImageURL (line 89) | type ImageURL = ChatCompletionContentPartImage.ImageURL; FILE: tests/embedding_stats.test.ts type EmbeddingLike (line 8) | type EmbeddingLike = EmbeddingPipeline & Record; function createEmbeddingPipelineBase (line 39) | function createEmbeddingPipelineBase(): EmbeddingLike { function createNDArray (line 80) | function createNDArray() { FILE: tests/engine_integration.test.ts type ChatConfig (line 20) | type ChatConfig = import("../src/config").ChatConfig; type Conversation (line 21) | type Conversation = import("../src/conversation").Conversation; type TVMInstance (line 22) | type TVMInstance = import("@mlc-ai/web-runtime").Instance; type Tokenizer (line 23) | type Tokenizer = import("@mlc-ai/web-tokenizers").Tokenizer; class MockLLMChatPipeline (line 30) | class MockLLMChatPipeline { method constructor (line 55) | constructor(_tvm: TVMInstance, _tokenizer: Tokenizer, config: ChatConf... method asyncLoadWebGPUPipelines (line 62) | async asyncLoadWebGPUPipelines() {} method dispose (line 63) | dispose() {} method sync (line 64) | async sync() {} method getConversationObject (line 66) | getConversationObject() { method setConversation (line 70) | setConversation(newConv: Conversation) { method resetChat (line 74) | resetChat() { method prefillStep (line 80) | async prefillStep( method decodeStep (line 98) | async decodeStep(genConfig?: { max_tokens?: number | null }) { method stopped (line 117) | stopped() { method triggerStop (line 121) | triggerStop() { method getMessage (line 126) | getMessage() { method getFinishReason (line 130) | getFinishReason() { method getCurRoundDecodingTotalTokens (line 134) | getCurRoundDecodingTotalTokens() { method getCurRoundPrefillTotalTokens (line 138) | getCurRoundPrefillTotalTokens() { method getCurRoundPrefillTokensPerSec (line 142) | getCurRoundPrefillTokensPerSec() { method getCurRoundDecodingTokensPerSec (line 146) | getCurRoundDecodingTokensPerSec() { method getCurRoundGrammarInitTotalTime (line 150) | getCurRoundGrammarInitTotalTime() { method getCurRoundPrefillTotalTime (line 154) | getCurRoundPrefillTotalTime() { method getCurRoundDecodingTotalTime (line 158) | getCurRoundDecodingTotalTime() { method getCurRoundGrammarPerTokenTotalTime (line 162) | getCurRoundGrammarPerTokenTotalTime() { method getCurRoundLatencyBreakdown (line 166) | getCurRoundLatencyBreakdown() { method getTokenLogprobArray (line 177) | getTokenLogprobArray() { method forwardTokensAndSample (line 181) | async forwardTokensAndSample(inputIds: Array): Promise { method runtimeStatsText (line 185) | async runtimeStatsText() { class MockEmbeddingPipeline (line 194) | class MockEmbeddingPipeline { method dispose (line 197) | dispose() {} method sync (line 198) | async sync() {} method embedStep (line 199) | async embedStep( method getCurRoundEmbedTotalTokens (line 205) | getCurRoundEmbedTotalTokens(): number { method getCurRoundEmbedTokensPerSec (line 213) | getCurRoundEmbedTokensPerSec(): number { constant MODEL_ID (line 221) | const MODEL_ID = "mock-model"; constant SECOND_MODEL_ID (line 222) | const SECOND_MODEL_ID = "mock-model-2"; constant EMBED_MODEL_ID (line 223) | const EMBED_MODEL_ID = "mock-embed"; function createEngineWithPipeline (line 259) | function createEngineWithPipeline(decodeLimit = 2, modelId = MODEL_ID) { function createEngineWithMultiplePipelines (line 286) | function createEngineWithMultiplePipelines() { function createEngineWithEmbeddingPipeline (line 330) | function createEngineWithEmbeddingPipeline() { FILE: tests/extension_service_worker.test.ts type MockPort (line 35) | type MockPort = chrome.runtime.Port & { function createPort (line 40) | function createPort(): MockPort { function createHandler (line 56) | function createHandler() { function mockChromeRuntime (line 96) | function mockChromeRuntime(port: MockPort = createPort()) { FILE: tests/llm_chat_pipeline.test.ts type XGrammarMock (line 42) | type XGrammarMock = { type PipelineLike (line 69) | type PipelineLike = LLMChatPipeline & Record; function createPipeline (line 71) | function createPipeline(): PipelineLike { function preparePrefillPipeline (line 200) | function preparePrefillPipeline(): PipelineLike { FILE: tests/scripts/sanity_checks/sanity_checks.ts function setLabel (line 3) | function setLabel(id: string, text: string) { function createEngine (line 9) | async function createEngine( function deleteModel (line 21) | async function deleteModel(modelId: string, appConfig: webllm.AppConfig) { function testLogitProcessor (line 25) | async function testLogitProcessor( function testLogitBias (line 71) | async function testLogitBias(modelId: string, appConfig: webllm.AppConfi... function testPenalties (line 102) | async function testPenalties(modelId: string, appConfig: webllm.AppConfi... function testLogprobs (line 127) | async function testLogprobs(modelId: string, appConfig: webllm.AppConfig) { function main (line 157) | async function main() { FILE: tests/service_worker.test.ts type ServiceWorkerHandlerEvent (line 9) | type ServiceWorkerHandlerEvent = Parameters< function setupWorkerScope (line 42) | function setupWorkerScope() { function setupNavigator (line 49) | function setupNavigator(options?: { function createHandler (line 70) | function createHandler() { FILE: tests/util.test.ts type ImageURL (line 328) | type ImageURL = ChatCompletionContentPartImage.ImageURL; function addOne (line 416) | async function addOne() { FILE: tests/web_worker_handler.test.ts function flushMicrotasks (line 50) | function flushMicrotasks() { class MockWorker (line 189) | class MockWorker { method constructor (line 194) | constructor() { method setResponder (line 202) | setResponder(kind: string, responder: (msg: any) => any) { FILE: utils/vram_requirements/src/vram_requirements.ts function setLabel (line 6) | function setLabel(id: string, text: string) { type AppConfig (line 14) | interface AppConfig { function main (line 25) | async function main() {