@degreesign/chat 1.7.6 → 1.7.8

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.
package/dist/enums.d.ts DELETED
@@ -1,80 +0,0 @@
1
- /** Author of a chat message */
2
- declare enum LlmRole {
3
- system = "system",
4
- user = "user",
5
- assistant = "assistant"
6
- }
7
- /** Assistant availability from engine */
8
- declare enum ChatStatus {
9
- online = 0,
10
- away = 1,
11
- offline = 2
12
- }
13
- /** On-device engine availability */
14
- declare enum LlmStatus {
15
- idle = 0,
16
- downloading = 1,
17
- ready = 2,
18
- error = 3,
19
- unsupported = 4
20
- }
21
- /** Engine running the model */
22
- declare enum LlmBackend {
23
- cpu = "cpu",
24
- gpu = "gpu",
25
- none = "none"
26
- }
27
- /** Download or load phase */
28
- declare enum LlmPhase {
29
- download = "download",
30
- load = "load"
31
- }
32
- /** Operation an estimate covers */
33
- declare enum EstimateOperation {
34
- analyze = "analyze",
35
- describe = "describe",
36
- translate = "translate",
37
- tags = "tags",
38
- translateTags = "translateTags"
39
- }
40
- /** Stage of an enhanced description */
41
- declare enum DescriptionEnhancedStage {
42
- translate = "translate",
43
- tags = "tags",
44
- translateTags = "translateTags"
45
- }
46
- /** Fields of a preload request */
47
- declare enum ChatPreloadField {
48
- model = "model",
49
- limits = "limits",
50
- logging = "logging",
51
- onStatus = "onStatus"
52
- }
53
- /** File system failure names */
54
- declare enum StoreFault {
55
- quota = "QuotaExceededError",
56
- notAllowed = "NotAllowedError",
57
- notSupported = "NotSupportedError",
58
- invalidState = "InvalidStateError",
59
- typeMismatch = "TypeMismatchError",
60
- security = "SecurityError"
61
- }
62
- /** Catalog ids of on-device models */
63
- declare enum ChatModelId {
64
- qwen3_vl_2b = "qwen3-vl-2b",
65
- qwen3_vl_2b_instruct = "qwen3-vl-2b-instruct",
66
- qwen3_vl_2b_instruct_q3 = "qwen3-vl-2b-instruct-q3",
67
- gemma4_e2b_limited = "gemma4-e2b-limited"
68
- }
69
- /** Built-in tools the package ships */
70
- declare enum BuiltinTool {
71
- websearch = "websearch",
72
- calculate = "calculate",
73
- currency = "currency"
74
- }
75
- /** Provider behind the websearch tool */
76
- declare enum WebSearchProvider {
77
- wikipedia = "wikipedia",
78
- duckduckgo = "duckduckgo"
79
- }
80
- export { LlmRole, ChatStatus, LlmStatus, LlmBackend, LlmPhase, EstimateOperation, DescriptionEnhancedStage, ChatPreloadField, StoreFault, ChatModelId, BuiltinTool, WebSearchProvider, };
@@ -1,13 +0,0 @@
1
- import { EstimateOperation } from './enums';
2
- import type { EstimateReport } from './types';
3
- declare const
4
- /** Build report of operations */
5
- estimateReport: (operations: EstimateOperation[]) => EstimateReport,
6
- /** Record one measured operation */
7
- recordEstimate: ({ operation, seconds, }: {
8
- operation: EstimateOperation;
9
- seconds: number;
10
- }) => void,
11
- /** Clear measured estimates */
12
- resetEstimates: () => void;
13
- export { estimateReport, recordEstimate, resetEstimates };
package/dist/log.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /** Write log line when enabled */
2
- declare const log: (logging: boolean | undefined, ...args: unknown[]) => void;
3
- export { log };
package/dist/models.d.ts DELETED
@@ -1,26 +0,0 @@
1
- import { ChatModelId } from './enums';
2
- import type { ChatModel, MobileNavigator } from './types';
3
- declare const llmModels: ChatModel[],
4
- /** CPU context window, 8k tokens */
5
- cpuContextWindow = 8192, // max 262_400
6
- /** Phone CPU window, 4096 tokens */
7
- mobileCpuContextWindow = 4096, // max 32_768
8
- /** GPU context window, 32k tokens */
9
- litertContextWindow = 32768, // max 32_768
10
- /** Phone GPU window, 16k tokens */
11
- mobileLitertContextWindow = 16384, // max 32_768
12
- /** Whether this client is mobile */
13
- mobileDevice: (nav?: MobileNavigator) => boolean,
14
- /** Find catalog entry by id */
15
- findLlmModel: (id?: string) => ChatModel | undefined,
16
- /** Whether browser has WebGPU adapter */
17
- gpuAdapter: () => Promise<boolean>,
18
- /** Default model, GPU when available */
19
- defaultLlmModel: () => Promise<ChatModelId | undefined>,
20
- /** Resolve requested model or default */
21
- resolveLlmModel: (id?: ChatModelId) => Promise<ChatModel | undefined>,
22
- /** Whether a model accepts images */
23
- supportsImages: (model: ChatModel) => boolean,
24
- /** Whether a model accepts audio */
25
- supportsAudio: (model: ChatModel) => boolean;
26
- export { llmModels, cpuContextWindow, mobileCpuContextWindow, litertContextWindow, mobileLitertContextWindow, mobileDevice, findLlmModel, gpuAdapter, defaultLlmModel, resolveLlmModel, supportsImages, supportsAudio, };
package/dist/prompts.d.ts DELETED
@@ -1,18 +0,0 @@
1
- declare const
2
- /** System message of the describer */
3
- imageSystem: string,
4
- /** Request for every image */
5
- imageNote: string,
6
- /** Nsfw flag tag word */
7
- nsfwTag = "nsfw",
8
- /** System message of the tagger */
9
- tagSystem: (imageTags: number) => string,
10
- /** System message of the tag translator */
11
- tagTranslateSystem: (language: string) => string,
12
- /** System message of the translator */
13
- translateSystem: string,
14
- /** Prompt preparing for translation */
15
- translatePreMessage = "describe this image in English very accurately",
16
- /** Prompt asking for one translation */
17
- translatePrompt: (language: string) => string;
18
- export { imageNote, imageSystem, nsfwTag, tagSystem, tagTranslateSystem, translateSystem, translatePreMessage, translatePrompt, };
package/dist/service.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { Runtime, RuntimeDeps } from './types';
2
- declare const createRuntime: (deps?: RuntimeDeps) => Runtime, runtime: Runtime;
3
- export { createRuntime, runtime };