@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,12 @@
1
+ import * as v from 'valibot';
2
+ export declare const LlamaSwapDefine: v.ObjectSchema<{
3
+ readonly healthCheckTimeout: v.OptionalSchema<v.NumberSchema<undefined>, 120>;
4
+ readonly logLevel: v.OptionalSchema<v.PicklistSchema<["debug", "info", "warn", "error"], undefined>, undefined>;
5
+ readonly startPort: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
6
+ readonly groups: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
7
+ readonly swap: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, undefined>, v.DescriptionAction<boolean | undefined, "- true : 仅允许一个模型同时运行\n- false : 所有模型均可同时运行,无需切换">]>;
8
+ readonly exclusive: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, undefined>, v.DescriptionAction<boolean | undefined, "- true:当此组运行模型时,会导致所有其他组卸载其模型\n- false:不会影响其他组">]>;
9
+ readonly members: v.ArraySchema<v.StringSchema<undefined>, undefined>;
10
+ readonly persistent: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
11
+ }, undefined>, undefined>, undefined>;
12
+ }, undefined>;
@@ -0,0 +1,218 @@
1
+ import * as v from 'valibot';
2
+ export declare const SamplingDefine: v.ObjectSchema<{
3
+ readonly samplers: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
4
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
5
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "SAMPLERS">]>], undefined>, undefined>]>;
6
+ }, undefined>, undefined>, v.DescriptionAction<{
7
+ enable: boolean;
8
+ value?: [string] | undefined;
9
+ } | undefined, "- samplers that will be used for generation in the order, separated by ';' (default: penalties;dry;top_n_sigma;top_k;typ_p;top_p;min_p;xtc;temperature)\n- samplers that will be used for generation in the order, separated by ';' (default: penalties;dry;top_n_sigma;top_k;typ_p;top_p;min_p;xtc;temperature)">]>;
10
+ readonly seed: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
11
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
12
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "SEED">]>], undefined>, undefined>]>;
13
+ }, undefined>, undefined>, v.DescriptionAction<{
14
+ enable: boolean;
15
+ value?: [string] | undefined;
16
+ } | undefined, "- RNG种子(默认:-1,使用随机种子)\n- RNG seed (default: -1, use random seed for -1)">]>;
17
+ readonly 'sampling-seq': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
18
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
19
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "SEQUENCE">]>], undefined>, undefined>]>;
20
+ }, undefined>, undefined>, v.DescriptionAction<{
21
+ enable: boolean;
22
+ value?: [string] | undefined;
23
+ } | undefined, "- 简化的采样序列,用于采样器(默认:edskypmxt)\n- simplified sequence for samplers that will be used (default: edskypmxt)">]>;
24
+ readonly 'ignore-eos': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
25
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
26
+ }, undefined>, undefined>, v.DescriptionAction<{
27
+ enable: boolean;
28
+ } | undefined, "- 忽略流结束标记并继续生成(隐含--logit-bias EOS-inf)\n- ignore end of stream token and continue generating (implies --logit-bias EOS-inf)">]>;
29
+ readonly temp: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
30
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
31
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
32
+ }, undefined>, undefined>, v.DescriptionAction<{
33
+ enable: boolean;
34
+ value?: [number] | undefined;
35
+ } | undefined, "- temperature (default: 0.8)\n- temperature (default: 0.8)">]>;
36
+ readonly 'top-k': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
37
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
38
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
39
+ }, undefined>, undefined>, v.DescriptionAction<{
40
+ enable: boolean;
41
+ value?: [number] | undefined;
42
+ } | undefined, "- top-k 采样 (默认: 40, 0 = 禁用)\n- top-k sampling (default: 40, 0 = disabled)">]>;
43
+ readonly 'top-p': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
44
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
45
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
46
+ }, undefined>, undefined>, v.DescriptionAction<{
47
+ enable: boolean;
48
+ value?: [number] | undefined;
49
+ } | undefined, "- top-p 采样(默认:0.9,1.0 = 禁用)\n- top-p sampling (default: 0.9, 1.0 = disabled)">]>;
50
+ readonly 'min-p': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
51
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
52
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
53
+ }, undefined>, undefined>, v.DescriptionAction<{
54
+ enable: boolean;
55
+ value?: [number] | undefined;
56
+ } | undefined, "- min-p 采样 (默认: 0.1, 0.0 = 禁用)\n- min-p sampling (default: 0.1, 0.0 = disabled)">]>;
57
+ readonly 'top-nsigma': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
58
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
59
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
60
+ }, undefined>, undefined>, v.DescriptionAction<{
61
+ enable: boolean;
62
+ value?: [number] | undefined;
63
+ } | undefined, "- Top-N-Sigma抽样方法(默认值:-1.0;当两个参数都为-1.0时,该方法被禁用)\n- top-n-sigma sampling (default: -1.0, -1.0 = disabled)">]>;
64
+ readonly 'xtc-probability': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
65
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
66
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
67
+ }, undefined>, undefined>, v.DescriptionAction<{
68
+ enable: boolean;
69
+ value?: [number] | undefined;
70
+ } | undefined, "- xtc probability (默认: 0.0, 0.0 = 禁用)\n- xtc probability (default: 0.0, 0.0 = disabled)">]>;
71
+ readonly 'xtc-threshold': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
72
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
73
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
74
+ }, undefined>, undefined>, v.DescriptionAction<{
75
+ enable: boolean;
76
+ value?: [number] | undefined;
77
+ } | undefined, "- xtc threshold (默认: 0.1, 1.0 = 禁用)\n- xtc threshold (default: 0.1, 1.0 = disabled)">]>;
78
+ readonly typical: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
79
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
80
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
81
+ }, undefined>, undefined>, v.DescriptionAction<{
82
+ enable: boolean;
83
+ value?: [number] | undefined;
84
+ } | undefined, "- 局部典型抽样,参数 p(默认:1.0,1.0 = 禁用)\n- locally typical sampling, parameter p (default: 1.0, 1.0 = disabled)">]>;
85
+ readonly 'repeat-last-n': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
86
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
87
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
88
+ }, undefined>, undefined>, v.DescriptionAction<{
89
+ enable: boolean;
90
+ value?: [number] | undefined;
91
+ } | undefined, "- 用于惩罚的最后n个token(默认:64,0 = 禁用,-1 = 上下文大小)\n- last n tokens to consider for penalize (default: 64, 0 = disabled, -1 = ctx_size)">]>;
92
+ readonly 'repeat-penalty': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
93
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
94
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
95
+ }, undefined>, undefined>, v.DescriptionAction<{
96
+ enable: boolean;
97
+ value?: [number] | undefined;
98
+ } | undefined, "- 惩罚重复的token序列(默认:1.0,1.0 = 禁用)\n- penalize repeat sequence of tokens (default: 1.0, 1.0 = disabled)">]>;
99
+ readonly 'presence-penalty': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
100
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
101
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
102
+ }, undefined>, undefined>, v.DescriptionAction<{
103
+ enable: boolean;
104
+ value?: [number] | undefined;
105
+ } | undefined, "- 重复 alpha 存在惩罚(默认:0.0,0.0 = 禁用)\n- repeat alpha presence penalty (default: 0.0, 0.0 = disabled)">]>;
106
+ readonly 'frequency-penalty': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
107
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
108
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
109
+ }, undefined>, undefined>, v.DescriptionAction<{
110
+ enable: boolean;
111
+ value?: [number] | undefined;
112
+ } | undefined, "- 重复 alpha 频率惩罚(默认:0.0,0.0 = 禁用)\n- repeat alpha frequency penalty (default: 0.0, 0.0 = disabled)">]>;
113
+ readonly 'dry-multiplier': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
114
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
115
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
116
+ }, undefined>, undefined>, v.DescriptionAction<{
117
+ enable: boolean;
118
+ value?: [number] | undefined;
119
+ } | undefined, "- 设置 DRY 采样乘数(默认:0.0,0.0 = 禁用)\n- set DRY sampling multiplier (default: 0.0, 0.0 = disabled)">]>;
120
+ readonly 'dry-base': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
121
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
122
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
123
+ }, undefined>, undefined>, v.DescriptionAction<{
124
+ enable: boolean;
125
+ value?: [number] | undefined;
126
+ } | undefined, "- 设置 DRY 采样基础值 (默认: 1.75)\n- set DRY sampling base value (default: 1.75)">]>;
127
+ readonly 'dry-allowed-length': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
128
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
129
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
130
+ }, undefined>, undefined>, v.DescriptionAction<{
131
+ enable: boolean;
132
+ value?: [number] | undefined;
133
+ } | undefined, "- 设置DRY采样的允许长度(默认:2)\n- set allowed length for DRY sampling (default: 2)">]>;
134
+ readonly 'dry-penalty-last-n': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
135
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
136
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
137
+ }, undefined>, undefined>, v.DescriptionAction<{
138
+ enable: boolean;
139
+ value?: [number] | undefined;
140
+ } | undefined, "- 设置最后n个token的DRY惩罚(默认:-1,0 = 禁用,-1 = 上下文大小)\n- set DRY penalty for the last n tokens (default: -1, 0 = disable, -1 = context size)">]>;
141
+ readonly 'dry-sequence-breaker': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
142
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
143
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "STRING">]>], undefined>, undefined>]>;
144
+ }, undefined>, undefined>, v.DescriptionAction<{
145
+ enable: boolean;
146
+ value?: [string] | undefined;
147
+ } | undefined, "- 添加序列破环器用于DRY抽样,清除默认的破环器('\\n', ':', '\"', '*');使用 \"none\" 不使用任何序列破环器\n- add sequence breaker for DRY sampling, clearing out default breakers ('\\n', ':', '\"', '*') in the process; use \"none\" to not use any sequence breakers">]>;
148
+ readonly 'dynatemp-range': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
149
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
150
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
151
+ }, undefined>, undefined>, v.DescriptionAction<{
152
+ enable: boolean;
153
+ value?: [number] | undefined;
154
+ } | undefined, "- 动态温度范围 (默认: 0.0, 0.0 = 禁用)\n- dynamic temperature range (default: 0.0, 0.0 = disabled)">]>;
155
+ readonly 'dynatemp-exp': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
156
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
157
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
158
+ }, undefined>, undefined>, v.DescriptionAction<{
159
+ enable: boolean;
160
+ value?: [number] | undefined;
161
+ } | undefined, "- 动态温度指数(默认:1.0)\n- dynamic temperature exponent (default: 1.0)">]>;
162
+ readonly mirostat: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
163
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
164
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
165
+ }, undefined>, undefined>, v.DescriptionAction<{
166
+ enable: boolean;
167
+ value?: [number] | undefined;
168
+ } | undefined, "- 使用Mirostat抽样。如果使用了Top K、Nucleus和Locally Typical抽样器,则会被忽略。(默认:0,0=禁用,1=Mirostat,2=Mirostat 2.0)\n- use Mirostat sampling. Top K, Nucleus and Locally Typical samplers are ignored if used. (default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0)">]>;
169
+ readonly 'mirostat-lr': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
170
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
171
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
172
+ }, undefined>, undefined>, v.DescriptionAction<{
173
+ enable: boolean;
174
+ value?: [number] | undefined;
175
+ } | undefined, "- Mirostat学习率,参数eta(默认:0.1)\n- Mirostat learning rate, parameter eta (default: 0.1)">]>;
176
+ readonly 'mirostat-ent': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
177
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
178
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "N">]>], undefined>, undefined>]>;
179
+ }, undefined>, undefined>, v.DescriptionAction<{
180
+ enable: boolean;
181
+ value?: [number] | undefined;
182
+ } | undefined, "- Mirostat目标熵,参数tau(默认:5.0)\n- Mirostat target entropy, parameter tau (default: 5.0)">]>;
183
+ readonly 'logit-bias': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
184
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
185
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "TOKEN_ID(+/-)BIAS">]>], undefined>, undefined>]>;
186
+ }, undefined>, undefined>, v.DescriptionAction<{
187
+ enable: boolean;
188
+ value?: [string] | undefined;
189
+ } | undefined, "- 修改标记出现在完成中的可能性,例如:--logit-bias 15043+1 增加标记 ' Hello' 的可能性,或 --logit 15043-1 减少标记 ' Hello' 的可能性\n- modifies the likelihood of token appearing in the completion, i.e. `--logit-bias 15043+1` to increase likelihood of token ' Hello', or `--logit-bias 15043-1` to decrease likelihood of token ' Hello'">]>;
190
+ readonly grammar: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
191
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
192
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "GRAMMAR">]>], undefined>, undefined>]>;
193
+ }, undefined>, undefined>, v.DescriptionAction<{
194
+ enable: boolean;
195
+ value?: [string] | undefined;
196
+ } | undefined, "- BNF类似语法约束生成(参见grammars目录中的示例)(默认:'')\n- BNF-like grammar to constrain generations (see samples in grammars/ dir) (default: '')">]>;
197
+ readonly 'grammar-file': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
198
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
199
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "FNAME">]>], undefined>, undefined>]>;
200
+ }, undefined>, undefined>, v.DescriptionAction<{
201
+ enable: boolean;
202
+ value?: [string] | undefined;
203
+ } | undefined, "- 从文件读取语法\n- file to read grammar from">]>;
204
+ readonly 'json-schema': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
205
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
206
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "SCHEMA">]>], undefined>, undefined>]>;
207
+ }, undefined>, undefined>, v.DescriptionAction<{
208
+ enable: boolean;
209
+ value?: [string] | undefined;
210
+ } | undefined, "- JSON schema 用于约束生成(https://json-schema.org/),例如 `{}` 表示任何 JSON 对象。对于包含外部 $refs 的 schema,使用 --grammar + example/json_schema_to_grammar.py 代替\n- JSON schema to constrain generations (https://json-schema.org/), e.g. `{}` for any JSON object For schemas w/ external $refs, use --grammar + example/json_schema_to_grammar.py instead">]>;
211
+ readonly 'json-schema-file': v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
212
+ readonly enable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
213
+ readonly value: v.SchemaWithPipe<readonly [v.OptionalSchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "FILE">]>], undefined>, undefined>]>;
214
+ }, undefined>, undefined>, v.DescriptionAction<{
215
+ enable: boolean;
216
+ value?: [string] | undefined;
217
+ } | undefined, "- 包含用于约束生成的JSON架构的文件(https://json-schema.org/),例如{}表示任何JSON对象 对于具有外部$refs的架构,使用--grammar + example/json_schema_to_grammar.py代替\n- File containing a JSON schema to constrain generations (https://json-schema.org/), e.g. `{}` for any JSON object For schemas w/ external $refs, use --grammar + example/json_schema_to_grammar.py instead">]>;
218
+ }, undefined>;
@@ -0,0 +1,4 @@
1
+ export declare function autoCheckVendor(repo: string, options: {
2
+ endpoint: string;
3
+ token?: string;
4
+ }): Promise<"ollama" | undefined>;
@@ -0,0 +1,9 @@
1
+ export declare function getGgufFile(name: string, options: {
2
+ endpoint: string;
3
+ token?: string;
4
+ fileName?: string;
5
+ }): Promise<{
6
+ fileList: string[];
7
+ fileName: string;
8
+ }>;
9
+ export declare function getGgufSplitPartsInfo(ggufPath: string): string[];
@@ -0,0 +1,18 @@
1
+ export declare function parseName(name: string): {
2
+ repo: string;
3
+ tag: string;
4
+ endpoint: string;
5
+ namespace: string;
6
+ } | {
7
+ repo: string;
8
+ tag: string;
9
+ namespace: string;
10
+ endpoint?: undefined;
11
+ };
12
+ export declare function getModelManifest(name: string, options: {
13
+ endpoint: string;
14
+ token?: string;
15
+ }): Promise<{
16
+ layers: any[];
17
+ ggufFile: any;
18
+ }>;
@@ -0,0 +1,7 @@
1
+ export declare function getOllamaGgufFile(name: string, options: {
2
+ endpoint: string;
3
+ token?: string;
4
+ }): Promise<{
5
+ fileList: string[];
6
+ fileName: string;
7
+ }>;
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './llama-swap.service';
2
+ export * from './token';
3
+ export * from './define';