@nemesis-oss/ollama-sdk 1.4.0 → 1.5.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.
- package/CHANGELOG.md +9 -0
- package/README.md +23 -2
- package/dist/{compose-DfAqKAFj.d.ts → compose-DLStUfaF.d.ts} +2 -2
- package/dist/{compose-BR70yb4W.d.cts → compose-DS-UWFx8.d.cts} +2 -2
- package/dist/generated-api.cjs +54 -11
- package/dist/generated-api.cjs.map +1 -1
- package/dist/generated-api.d.cts +4 -3
- package/dist/generated-api.d.ts +4 -3
- package/dist/generated-api.js +54 -11
- package/dist/generated-api.js.map +1 -1
- package/dist/generated-models-schemas.cjs +192 -192
- package/dist/generated-models-schemas.cjs.map +1 -1
- package/dist/generated-models-schemas.js +192 -192
- package/dist/generated-models-schemas.js.map +1 -1
- package/dist/generated-runtime.cjs +229 -9
- package/dist/generated-runtime.cjs.map +1 -1
- package/dist/generated-runtime.d.cts +35 -2
- package/dist/generated-runtime.d.ts +35 -2
- package/dist/generated-runtime.js +228 -10
- package/dist/generated-runtime.js.map +1 -1
- package/dist/index.cjs +403 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +403 -146
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools.json +19 -70
- package/dist/mcp-generated.cjs +54 -11
- package/dist/mcp-generated.cjs.map +1 -1
- package/dist/mcp-generated.d.cts +4 -3
- package/dist/mcp-generated.d.ts +4 -3
- package/dist/mcp-generated.js +54 -11
- package/dist/mcp-generated.js.map +1 -1
- package/dist/mcp-http.d.cts +1 -1
- package/dist/mcp-http.d.ts +1 -1
- package/dist/mcp-stdio.d.cts +1 -1
- package/dist/mcp-stdio.d.ts +1 -1
- package/dist/{index-DIQ8NUbU.d.ts → runtime-CVQkbYgF.d.ts} +40 -2
- package/dist/{index-2RIErNT5.d.cts → runtime-IxRpUBjN.d.cts} +40 -2
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.d.cts +3 -3
- package/dist/skills.d.ts +3 -3
- package/dist/skills.js.map +1 -1
- package/dist/{types-BQhgW-du.d.cts → types-5PAjLoCp.d.cts} +1 -1
- package/dist/{types-BQhgW-du.d.ts → types-5PAjLoCp.d.ts} +1 -1
- package/dist/{types-B9_axjum.d.cts → types-MOsWXEE7.d.cts} +1 -1
- package/dist/{types-B9_axjum.d.ts → types-MOsWXEE7.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -2,288 +2,288 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
// src/generated/models/ChatMessage.schema.ts
|
|
4
4
|
var ToolCallSchema = z.object({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
function: z.object({
|
|
6
|
+
name: z.string(),
|
|
7
|
+
description: z.string().optional(),
|
|
8
|
+
arguments: z.object({}).optional()
|
|
9
9
|
}).optional()
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
// src/generated/models/ChatMessage.schema.ts
|
|
13
13
|
var ChatMessageSchema = z.object({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
role: z.enum(["system", "user", "assistant", "tool"]),
|
|
15
|
+
content: z.string(),
|
|
16
|
+
images: z.array(z.string()).optional(),
|
|
17
|
+
tool_calls: z.array(ToolCallSchema).optional()
|
|
18
18
|
});
|
|
19
19
|
var ModelOptionsSchema = z.object({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
seed: z.number().optional(),
|
|
21
|
+
temperature: z.number().optional(),
|
|
22
|
+
top_k: z.number().optional(),
|
|
23
|
+
top_p: z.number().optional(),
|
|
24
|
+
min_p: z.number().optional(),
|
|
25
|
+
stop: z.union([z.string(), z.array(z.string())]).optional(),
|
|
26
|
+
num_ctx: z.number().optional(),
|
|
27
|
+
num_predict: z.number().optional()
|
|
28
28
|
}).catchall(z.unknown());
|
|
29
29
|
var ThinkValueSchema = z.union([z.boolean(), z.string(), z.null()]);
|
|
30
30
|
var ToolDefinitionSchema = z.object({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
type: z.enum(["function"]),
|
|
32
|
+
function: z.object({
|
|
33
|
+
name: z.string(),
|
|
34
|
+
description: z.string().optional(),
|
|
35
|
+
parameters: z.object({})
|
|
36
36
|
})
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
// src/generated/models/ChatRequest.schema.ts
|
|
40
40
|
var ChatRequestSchema = z.object({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
model: z.string(),
|
|
42
|
+
messages: z.array(ChatMessageSchema),
|
|
43
|
+
tools: z.array(ToolDefinitionSchema).optional(),
|
|
44
|
+
format: z.union([z.enum(["json"]), z.object({})]).optional(),
|
|
45
|
+
options: ModelOptionsSchema.optional(),
|
|
46
|
+
stream: z.boolean().optional(),
|
|
47
|
+
think: ThinkValueSchema.optional(),
|
|
48
|
+
keep_alive: z.union([z.string(), z.number()]).optional(),
|
|
49
|
+
logprobs: z.boolean().optional(),
|
|
50
|
+
top_logprobs: z.number().optional()
|
|
51
51
|
});
|
|
52
52
|
var TokenLogprobSchema = z.object({
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
token: z.string().optional(),
|
|
54
|
+
logprob: z.number().optional(),
|
|
55
|
+
bytes: z.array(z.number()).optional()
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
// src/generated/models/Logprob.schema.ts
|
|
59
59
|
var LogprobSchema = z.object({
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
token: z.string().optional(),
|
|
61
|
+
logprob: z.number().optional(),
|
|
62
|
+
bytes: z.array(z.number()).optional(),
|
|
63
|
+
top_logprobs: z.array(TokenLogprobSchema).optional()
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
// src/generated/models/ChatResponse.schema.ts
|
|
67
67
|
var ChatResponseSchema = z.object({
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
model: z.string().optional(),
|
|
69
|
+
created_at: z.string().optional(),
|
|
70
|
+
message: z.object({
|
|
71
|
+
role: z.enum(["assistant"]).optional(),
|
|
72
|
+
content: z.string().optional(),
|
|
73
|
+
thinking: z.string().optional(),
|
|
74
|
+
tool_calls: z.array(ToolCallSchema).optional(),
|
|
75
|
+
images: z.array(z.string()).optional()
|
|
76
76
|
}).optional(),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
done: z.boolean().optional(),
|
|
78
|
+
done_reason: z.string().optional(),
|
|
79
|
+
total_duration: z.number().optional(),
|
|
80
|
+
load_duration: z.number().optional(),
|
|
81
|
+
prompt_eval_count: z.number().optional(),
|
|
82
|
+
prompt_eval_cached_count: z.number().optional(),
|
|
83
|
+
prompt_eval_duration: z.number().optional(),
|
|
84
|
+
eval_count: z.number().optional(),
|
|
85
|
+
eval_duration: z.number().optional(),
|
|
86
|
+
logprobs: z.array(LogprobSchema).optional()
|
|
87
87
|
});
|
|
88
88
|
var ChatStreamEventSchema = z.object({
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
model: z.string().optional(),
|
|
90
|
+
created_at: z.string().optional(),
|
|
91
|
+
message: z.object({
|
|
92
|
+
role: z.string().optional(),
|
|
93
|
+
content: z.string().optional(),
|
|
94
|
+
thinking: z.string().optional(),
|
|
95
|
+
tool_calls: z.array(ToolCallSchema).optional(),
|
|
96
|
+
images: z.array(z.string()).optional()
|
|
97
97
|
}).optional(),
|
|
98
|
-
|
|
98
|
+
done: z.boolean().optional()
|
|
99
99
|
});
|
|
100
100
|
var CopyRequestSchema = z.object({
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
source: z.string(),
|
|
102
|
+
destination: z.string()
|
|
103
103
|
});
|
|
104
104
|
var CreateRequestSchema = z.object({
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
105
|
+
model: z.string(),
|
|
106
|
+
from: z.string().optional(),
|
|
107
|
+
template: z.string().optional(),
|
|
108
|
+
renderer: z.string().optional(),
|
|
109
|
+
parser: z.string().optional(),
|
|
110
|
+
files: z.object({}).catchall(z.string()).optional(),
|
|
111
|
+
draft_files: z.object({}).catchall(z.string()).optional(),
|
|
112
|
+
license: z.union([z.string(), z.array(z.string())]).optional(),
|
|
113
|
+
system: z.string().optional(),
|
|
114
|
+
parameters: z.object({}).optional(),
|
|
115
|
+
messages: z.array(ChatMessageSchema).optional(),
|
|
116
|
+
quantize: z.string().optional(),
|
|
117
|
+
draft_quantize: z.string().optional(),
|
|
118
|
+
requires: z.string().optional(),
|
|
119
|
+
stream: z.boolean().optional()
|
|
120
120
|
});
|
|
121
121
|
var DeleteRequestSchema = z.object({
|
|
122
|
-
|
|
122
|
+
model: z.string()
|
|
123
123
|
});
|
|
124
124
|
var EmbedRequestSchema = z.object({
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
model: z.string(),
|
|
126
|
+
input: z.union([z.string(), z.array(z.string())]),
|
|
127
|
+
truncate: z.boolean().optional(),
|
|
128
|
+
dimensions: z.number().optional(),
|
|
129
|
+
keep_alive: z.string().optional(),
|
|
130
|
+
options: ModelOptionsSchema.optional()
|
|
131
131
|
});
|
|
132
132
|
var EmbedResponseSchema = z.object({
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
model: z.string().optional(),
|
|
134
|
+
embeddings: z.array(z.array(z.number())).optional(),
|
|
135
|
+
total_duration: z.number().optional(),
|
|
136
|
+
load_duration: z.number().optional(),
|
|
137
|
+
prompt_eval_count: z.number().optional()
|
|
138
138
|
});
|
|
139
139
|
var ErrorResponseSchema = z.object({
|
|
140
|
-
|
|
140
|
+
error: z.string().optional()
|
|
141
141
|
});
|
|
142
142
|
var GenerateRequestSchema = z.object({
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
143
|
+
model: z.string(),
|
|
144
|
+
prompt: z.string().optional(),
|
|
145
|
+
suffix: z.string().optional(),
|
|
146
|
+
images: z.array(z.string()).optional(),
|
|
147
|
+
format: z.union([z.string(), z.object({})]).optional(),
|
|
148
|
+
system: z.string().optional(),
|
|
149
|
+
stream: z.boolean().optional(),
|
|
150
|
+
think: ThinkValueSchema.optional(),
|
|
151
|
+
raw: z.boolean().optional(),
|
|
152
|
+
keep_alive: z.union([z.string(), z.number()]).optional(),
|
|
153
|
+
options: ModelOptionsSchema.optional(),
|
|
154
|
+
logprobs: z.boolean().optional(),
|
|
155
|
+
top_logprobs: z.number().optional()
|
|
156
156
|
});
|
|
157
157
|
var GenerateResponseSchema = z.object({
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
158
|
+
model: z.string().optional(),
|
|
159
|
+
created_at: z.string().optional(),
|
|
160
|
+
response: z.string().optional(),
|
|
161
|
+
thinking: z.string().optional(),
|
|
162
|
+
done: z.boolean().optional(),
|
|
163
|
+
done_reason: z.string().optional(),
|
|
164
|
+
total_duration: z.number().optional(),
|
|
165
|
+
load_duration: z.number().optional(),
|
|
166
|
+
prompt_eval_count: z.number().optional(),
|
|
167
|
+
prompt_eval_cached_count: z.number().optional(),
|
|
168
|
+
prompt_eval_duration: z.number().optional(),
|
|
169
|
+
eval_count: z.number().optional(),
|
|
170
|
+
eval_duration: z.number().optional(),
|
|
171
|
+
logprobs: z.array(LogprobSchema).optional()
|
|
172
172
|
});
|
|
173
173
|
var GenerateStreamEventSchema = z.object({
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
174
|
+
model: z.string().optional(),
|
|
175
|
+
created_at: z.string().optional(),
|
|
176
|
+
response: z.string().optional(),
|
|
177
|
+
thinking: z.string().optional(),
|
|
178
|
+
done: z.boolean().optional(),
|
|
179
|
+
done_reason: z.string().optional(),
|
|
180
|
+
total_duration: z.number().optional(),
|
|
181
|
+
load_duration: z.number().optional(),
|
|
182
|
+
prompt_eval_count: z.number().optional(),
|
|
183
|
+
prompt_eval_cached_count: z.number().optional(),
|
|
184
|
+
prompt_eval_duration: z.number().optional(),
|
|
185
|
+
eval_count: z.number().optional(),
|
|
186
|
+
eval_duration: z.number().optional()
|
|
187
187
|
});
|
|
188
188
|
var ModelSummarySchema = z.object({
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
189
|
+
name: z.string().optional(),
|
|
190
|
+
model: z.string().optional(),
|
|
191
|
+
remote_model: z.string().optional(),
|
|
192
|
+
remote_host: z.string().optional(),
|
|
193
|
+
modified_at: z.string().optional(),
|
|
194
|
+
size: z.number().optional(),
|
|
195
|
+
digest: z.string().optional(),
|
|
196
|
+
details: z.object({
|
|
197
|
+
format: z.string().optional(),
|
|
198
|
+
family: z.string().optional(),
|
|
199
|
+
families: z.array(z.string()).optional(),
|
|
200
|
+
parameter_size: z.string().optional(),
|
|
201
|
+
quantization_level: z.string().optional()
|
|
202
202
|
}).optional()
|
|
203
203
|
});
|
|
204
204
|
|
|
205
205
|
// src/generated/models/ListResponse.schema.ts
|
|
206
206
|
var ListResponseSchema = z.object({
|
|
207
|
-
|
|
207
|
+
models: z.array(ModelSummarySchema).optional()
|
|
208
208
|
});
|
|
209
209
|
var PsSchema = z.object({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
210
|
+
name: z.string().optional(),
|
|
211
|
+
model: z.string().optional(),
|
|
212
|
+
size: z.number().optional(),
|
|
213
|
+
digest: z.string().optional(),
|
|
214
|
+
details: z.object({}).optional(),
|
|
215
|
+
expires_at: z.string().optional(),
|
|
216
|
+
size_vram: z.number().optional(),
|
|
217
|
+
context_length: z.number().optional()
|
|
218
218
|
});
|
|
219
219
|
|
|
220
220
|
// src/generated/models/PsResponse.schema.ts
|
|
221
221
|
var PsResponseSchema = z.object({
|
|
222
|
-
|
|
222
|
+
models: z.array(PsSchema).optional()
|
|
223
223
|
});
|
|
224
224
|
var PullRequestSchema = z.object({
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
225
|
+
model: z.string(),
|
|
226
|
+
insecure: z.boolean().optional(),
|
|
227
|
+
stream: z.boolean().optional()
|
|
228
228
|
});
|
|
229
229
|
var PushRequestSchema = z.object({
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
model: z.string(),
|
|
231
|
+
insecure: z.boolean().optional(),
|
|
232
|
+
stream: z.boolean().optional()
|
|
233
233
|
});
|
|
234
234
|
var ShowRequestSchema = z.object({
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
model: z.string(),
|
|
236
|
+
verbose: z.boolean().optional()
|
|
237
237
|
});
|
|
238
238
|
var ThinkingSchema = z.object({
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
values: z.array(z.union([z.boolean(), z.string()])),
|
|
240
|
+
default: z.union([z.boolean(), z.string()])
|
|
241
241
|
});
|
|
242
242
|
|
|
243
243
|
// src/generated/models/ShowResponse.schema.ts
|
|
244
244
|
var ShowResponseSchema = z.object({
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
245
|
+
thinking: ThinkingSchema.optional(),
|
|
246
|
+
parameters: z.string().optional(),
|
|
247
|
+
license: z.string().optional(),
|
|
248
|
+
modified_at: z.string().optional(),
|
|
249
|
+
details: z.object({}).optional(),
|
|
250
|
+
template: z.string().optional(),
|
|
251
|
+
capabilities: z.array(z.string()).optional(),
|
|
252
|
+
model_info: z.object({}).optional()
|
|
253
253
|
});
|
|
254
254
|
var StatusEventSchema = z.object({
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
status: z.string().optional(),
|
|
256
|
+
digest: z.string().optional(),
|
|
257
|
+
total: z.number().optional(),
|
|
258
|
+
completed: z.number().optional()
|
|
259
259
|
});
|
|
260
260
|
var StatusResponseSchema = z.object({
|
|
261
|
-
|
|
261
|
+
status: z.string().optional()
|
|
262
262
|
});
|
|
263
263
|
var VersionResponseSchema = z.object({
|
|
264
|
-
|
|
264
|
+
version: z.string().optional()
|
|
265
265
|
});
|
|
266
266
|
var WebFetchRequestSchema = z.object({
|
|
267
|
-
|
|
267
|
+
url: z.string()
|
|
268
268
|
});
|
|
269
269
|
var WebFetchResponseSchema = z.object({
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
title: z.string().optional(),
|
|
271
|
+
content: z.string().optional(),
|
|
272
|
+
links: z.array(z.string()).optional()
|
|
273
273
|
});
|
|
274
274
|
var WebSearchRequestSchema = z.object({
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
query: z.string(),
|
|
276
|
+
max_results: z.number().optional()
|
|
277
277
|
});
|
|
278
278
|
var WebSearchResultSchema = z.object({
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
title: z.string().optional(),
|
|
280
|
+
url: z.string().optional(),
|
|
281
|
+
content: z.string().optional()
|
|
282
282
|
});
|
|
283
283
|
|
|
284
284
|
// src/generated/models/WebSearchResponse.schema.ts
|
|
285
285
|
var WebSearchResponseSchema = z.object({
|
|
286
|
-
|
|
286
|
+
results: z.array(WebSearchResultSchema).optional()
|
|
287
287
|
});
|
|
288
288
|
|
|
289
289
|
export { ChatMessageSchema, ChatRequestSchema, ChatResponseSchema, ChatStreamEventSchema, CopyRequestSchema, CreateRequestSchema, DeleteRequestSchema, EmbedRequestSchema, EmbedResponseSchema, ErrorResponseSchema, GenerateRequestSchema, GenerateResponseSchema, GenerateStreamEventSchema, ListResponseSchema, LogprobSchema, ModelOptionsSchema, ModelSummarySchema, PsResponseSchema, PsSchema, PullRequestSchema, PushRequestSchema, ShowRequestSchema, ShowResponseSchema, StatusEventSchema, StatusResponseSchema, ThinkValueSchema, ThinkingSchema, TokenLogprobSchema, ToolCallSchema, ToolDefinitionSchema, VersionResponseSchema, WebFetchRequestSchema, WebFetchResponseSchema, WebSearchRequestSchema, WebSearchResponseSchema, WebSearchResultSchema };
|