@blank-utils/llm 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Local LLM - Browser-based LLM inference library
3
+ *
4
+ * A simple, generalized library for interacting with LLMs directly in the browser.
5
+ * Works in any codebase with WebGPU or WASM support.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { createLLM } from '@blank-utils/llm';
10
+ *
11
+ * const llm = await createLLM({
12
+ * onLoadProgress: (p) => console.log(`Loading: ${p.progress}%`)
13
+ * });
14
+ *
15
+ * // Streaming generation
16
+ * await llm.stream('Tell me a joke', (token) => console.log(token));
17
+ *
18
+ * // Attach to DOM elements
19
+ * llm.attachToInput('#input', '#output');
20
+ * ```
21
+ *
22
+ * @module @blank-utils/llm
23
+ */
24
+ export { type Backend, type Device, type Quantization, type LLMConfig, type MessageRole, type ChatMessage, type StreamCallback, type LoadProgress, type LoadProgressCallback, type GenerateOptions, type LLMProviderInterface, type AttachOptions, type BrowserCapabilities, checkWebGPU, checkWasm, detectCapabilities, logCapabilities, WebLLMProvider, createWebLLMProvider, DEFAULT_WEBLLM_MODEL, WEBLLM_MODELS, TransformersProvider, createTransformersProvider, DEFAULT_TRANSFORMERS_MODEL, TRANSFORMERS_MODELS, createOutputStreamer, attachToElements, createChatUI, createLoadingIndicator, type LocalLLM, createLLM, isWebGPUSupported, } from './core';
25
+ export { createLLM as default } from './core';
26
+ export { LLMProvider, useLLM, useChat, useStream, useCompletion, LLMLoading, LLMReady, type LLMContextValue, type LLMProviderProps, type UseChatOptions, type UseChatReturn, type UseStreamOptions, type UseStreamReturn, type UseCompletionOptions, type UseCompletionReturn, type LLMLoadingProps, type LLMReadyProps, } from './react';
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EAGxB,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,eAAe,EAGf,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,mBAAmB,EAGnB,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EAGtB,KAAK,QAAQ,EACb,SAAS,EACT,iBAAiB,GAClB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAQ9C,OAAO,EAEL,WAAW,EACX,MAAM,EAGN,OAAO,EACP,SAAS,EACT,aAAa,EAGb,UAAU,EACV,QAAQ,EAGR,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,SAAS,CAAC"}