@shenghuabi/llama 1.0.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,11 @@
1
+ export interface MainifestType {
2
+ schemaVersion: number;
3
+ mediaType: string;
4
+ config: MediaConfig;
5
+ layers: MediaConfig[];
6
+ }
7
+ export interface MediaConfig {
8
+ mediaType: string;
9
+ digest: string;
10
+ size: number;
11
+ }
@@ -0,0 +1,4 @@
1
+ export declare function getOllamaModel(rootDir?: string): Promise<{
2
+ name: string;
3
+ value: string;
4
+ }[]>;
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@shenghuabi/llama",
3
+ "version": "1.0.0",
4
+ "description": "llama/ollama",
5
+ "author": "wszgrcy",
6
+ "sideEffects": false,
7
+ "type": "module",
8
+ "peerDependencies": {
9
+ "@cyia/external-call": "^1.5.2",
10
+ "@cyia/vfs2": "^1.5.2",
11
+ "@cyia/zip": "^1.5.2",
12
+ "execa": "^9.6.0",
13
+ "static-injector": ">=6.1.2",
14
+ "valibot": "^1.1.0"
15
+ },
16
+ "dependencies": {
17
+ "normalize-path": "^3.0.0",
18
+ "magic-string": "^0.30.18",
19
+ "yaml": "^2.8.0",
20
+ "semver": "^7.7.2"
21
+ },
22
+ "overrides": {},
23
+ "exports": {
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "import": "./index.mjs",
27
+ "node": "./index.js",
28
+ "require": "./index.js"
29
+ },
30
+ "./define": {
31
+ "types": "./define/index.d.ts",
32
+ "import": "./define/index.mjs",
33
+ "node": "./define/index.js",
34
+ "require": "./define/index.js"
35
+ }
36
+ },
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "repository": {
41
+ "url": "https://github.com/wszgrcy/toolkit"
42
+ }
43
+ }
package/token.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { InjectionToken, Signal } from 'static-injector';
2
+ export interface LLamaConfig {
3
+ dir: string;
4
+ listen: string;
5
+ useRelConfigPath?: boolean;
6
+ /** 配合相对路径使用 */
7
+ cwd?: string;
8
+ }
9
+ export declare const LLamaConfigToken: InjectionToken<Signal<LLamaConfig>>;
10
+ export declare const OLLAMA_MODEL_URL_TOKEN: InjectionToken<Signal<string>>;
@@ -0,0 +1,2 @@
1
+ export declare function llamaSwapFileNameByVersion(version: string): string;
2
+ export declare function llamaFileNameByVersion(version: string, device: string): string;