@nemesis-oss/ollama-sdk 1.7.0 → 1.9.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 +168 -1
- package/README.md +181 -10
- package/dist/anthropic-5oYIRS6D.d.ts +1649 -0
- package/dist/anthropic-BIh45UXj.d.cts +1649 -0
- package/dist/{compose-DLStUfaF.d.ts → compose-DCVYMvOL.d.ts} +1 -1
- package/dist/{compose-DS-UWFx8.d.cts → compose-Dj6FdF2n.d.cts} +1 -1
- package/dist/generated-api.cjs +116 -9
- package/dist/generated-api.cjs.map +1 -1
- package/dist/generated-api.d.cts +321 -630
- package/dist/generated-api.d.ts +321 -630
- package/dist/generated-api.js +112 -10
- package/dist/generated-api.js.map +1 -1
- package/dist/generated-models-schemas.cjs +151 -3
- package/dist/generated-models-schemas.cjs.map +1 -1
- package/dist/generated-models-schemas.d.cts +228 -3
- package/dist/generated-models-schemas.d.ts +228 -3
- package/dist/generated-models-schemas.js +134 -4
- package/dist/generated-models-schemas.js.map +1 -1
- package/dist/generated-runtime.cjs +679 -60
- package/dist/generated-runtime.cjs.map +1 -1
- package/dist/generated-runtime.d.cts +22 -24
- package/dist/generated-runtime.d.ts +22 -24
- package/dist/generated-runtime.js +678 -61
- package/dist/generated-runtime.js.map +1 -1
- package/dist/index.cjs +2468 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1666 -864
- package/dist/index.d.ts +1666 -864
- package/dist/index.js +2432 -133
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools.json +306 -73
- package/dist/mcp-generated.cjs +138 -7
- package/dist/mcp-generated.cjs.map +1 -1
- package/dist/mcp-generated.d.cts +2 -2
- package/dist/mcp-generated.d.ts +2 -2
- package/dist/mcp-generated.js +138 -7
- package/dist/mcp-generated.js.map +1 -1
- package/dist/{runtime-qwD72cpn.d.ts → runtime-C3rfpkZw.d.ts} +286 -5
- package/dist/{runtime-bQ48I-RC.d.cts → runtime-D2W9TfCJ.d.cts} +286 -5
- 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-5PAjLoCp.d.cts → types-DVcX_zMp.d.cts} +110 -10
- package/dist/{types-5PAjLoCp.d.ts → types-DVcX_zMp.d.ts} +110 -10
- package/package.json +9 -5
package/dist/generated-api.d.cts
CHANGED
|
@@ -1,610 +1,10 @@
|
|
|
1
|
-
import { O as
|
|
2
|
-
export {
|
|
3
|
-
import './
|
|
1
|
+
import { O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, b as OpenAIChatCompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, e as OpenAICompletionChunk, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, h as OpenAIListModelsResponse, i as OpenAIModelItem, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, l as OpenAIResponsesStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, n as AnthropicMessageStreamEvent } from './anthropic-BIh45UXj.cjs';
|
|
2
|
+
export { N as NativeApi } from './anthropic-BIh45UXj.cjs';
|
|
3
|
+
import { O as OllamaRuntime } from './runtime-D2W9TfCJ.cjs';
|
|
4
|
+
export { a as OperationDefinition } from './runtime-D2W9TfCJ.cjs';
|
|
5
|
+
import './types-DVcX_zMp.cjs';
|
|
4
6
|
import 'zod';
|
|
5
7
|
|
|
6
|
-
/**
|
|
7
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
8
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
9
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
interface ChatMessage {
|
|
13
|
-
/** Author of the message. */
|
|
14
|
-
readonly role: 'system' | 'user' | 'assistant' | 'tool';
|
|
15
|
-
/** Message text content */
|
|
16
|
-
readonly content: string;
|
|
17
|
-
/** Optional list of inline images for multimodal models */
|
|
18
|
-
readonly images?: readonly string[] | undefined;
|
|
19
|
-
/** Tool call requests produced by the model */
|
|
20
|
-
readonly tool_calls?: readonly ToolCall[] | undefined;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
25
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
26
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
interface ChatRequest {
|
|
30
|
-
/** Model name */
|
|
31
|
-
readonly model: string;
|
|
32
|
-
/** Chat history as an array of message objects (each with a role and content) */
|
|
33
|
-
readonly messages: readonly ChatMessage[];
|
|
34
|
-
/** Optional list of function tools the model may call during the chat */
|
|
35
|
-
readonly tools?: readonly ToolDefinition[] | undefined;
|
|
36
|
-
/** Format to return a response in. Can be `json` or a JSON schema */
|
|
37
|
-
readonly format?: 'json' | Record<string, unknown> | undefined;
|
|
38
|
-
readonly options?: ModelOptions | undefined;
|
|
39
|
-
readonly stream?: boolean | undefined;
|
|
40
|
-
readonly think?: ThinkValue | undefined;
|
|
41
|
-
/** Model keep-alive duration (for example `5m` or `0` to unload immediately) */
|
|
42
|
-
readonly keep_alive?: string | number | undefined;
|
|
43
|
-
/** Whether to return log probabilities of the output tokens */
|
|
44
|
-
readonly logprobs?: boolean | undefined;
|
|
45
|
-
/** Number of most likely tokens to return at each token position when logprobs are enabled */
|
|
46
|
-
readonly top_logprobs?: number | undefined;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
51
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
52
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
interface ChatResponse {
|
|
56
|
-
/** Model name used to generate this message */
|
|
57
|
-
readonly model?: string | undefined;
|
|
58
|
-
/** Timestamp of response creation (ISO 8601) */
|
|
59
|
-
readonly created_at?: string | undefined;
|
|
60
|
-
readonly message?: {
|
|
61
|
-
/** Always `assistant` for model responses */
|
|
62
|
-
readonly role?: 'assistant' | undefined;
|
|
63
|
-
/** Assistant message text */
|
|
64
|
-
readonly content?: string | undefined;
|
|
65
|
-
/** Optional deliberate thinking trace when `think` is enabled */
|
|
66
|
-
readonly thinking?: string | undefined;
|
|
67
|
-
/** Tool calls requested by the assistant */
|
|
68
|
-
readonly tool_calls?: readonly ToolCall[] | undefined;
|
|
69
|
-
/** Optional base64-encoded images in the response */
|
|
70
|
-
readonly images?: readonly string[] | undefined;
|
|
71
|
-
} | undefined;
|
|
72
|
-
/** Indicates whether the chat response has finished */
|
|
73
|
-
readonly done?: boolean | undefined;
|
|
74
|
-
/** Reason the response finished */
|
|
75
|
-
readonly done_reason?: string | undefined;
|
|
76
|
-
/** Total time spent generating in nanoseconds */
|
|
77
|
-
readonly total_duration?: number | undefined;
|
|
78
|
-
/** Time spent loading the model in nanoseconds */
|
|
79
|
-
readonly load_duration?: number | undefined;
|
|
80
|
-
/** Number of tokens in the prompt */
|
|
81
|
-
readonly prompt_eval_count?: number | undefined;
|
|
82
|
-
/** Number of prompt tokens read from the cache */
|
|
83
|
-
readonly prompt_eval_cached_count?: number | undefined;
|
|
84
|
-
/** Time spent evaluating uncached prompt tokens in nanoseconds */
|
|
85
|
-
readonly prompt_eval_duration?: number | undefined;
|
|
86
|
-
/** Number of tokens generated in the response */
|
|
87
|
-
readonly eval_count?: number | undefined;
|
|
88
|
-
/** Time spent generating tokens in nanoseconds */
|
|
89
|
-
readonly eval_duration?: number | undefined;
|
|
90
|
-
/** Log probability information for the generated tokens when logprobs are enabled */
|
|
91
|
-
readonly logprobs?: readonly Logprob[] | undefined;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
96
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
97
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
98
|
-
*/
|
|
99
|
-
interface CopyRequest {
|
|
100
|
-
/** Existing model name to copy from */
|
|
101
|
-
readonly source: string;
|
|
102
|
-
/** New model name to create */
|
|
103
|
-
readonly destination: string;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
108
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
109
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
interface CreateRequest {
|
|
113
|
-
/** Name for the model to create */
|
|
114
|
-
readonly model: string;
|
|
115
|
-
/** Existing model to create from */
|
|
116
|
-
readonly from?: string | undefined;
|
|
117
|
-
/** Prompt template to use for the model */
|
|
118
|
-
readonly template?: string | undefined;
|
|
119
|
-
/** Name of the renderer for the model */
|
|
120
|
-
readonly renderer?: string | undefined;
|
|
121
|
-
/** Name of the parser for the model */
|
|
122
|
-
readonly parser?: string | undefined;
|
|
123
|
-
/** Source file names mapped to their SHA-256 digests. Split GGUF models must include each shard under its original split filename. */
|
|
124
|
-
readonly files?: {
|
|
125
|
-
[key: string]: string;
|
|
126
|
-
} | undefined;
|
|
127
|
-
/** Draft source file names mapped to their SHA-256 digests */
|
|
128
|
-
readonly draft_files?: {
|
|
129
|
-
[key: string]: string;
|
|
130
|
-
} | undefined;
|
|
131
|
-
/** License string or list of licenses for the model */
|
|
132
|
-
readonly license?: string | string[] | undefined;
|
|
133
|
-
/** System prompt to embed in the model */
|
|
134
|
-
readonly system?: string | undefined;
|
|
135
|
-
/** Key-value parameters for the model */
|
|
136
|
-
readonly parameters?: Record<string, unknown> | undefined;
|
|
137
|
-
/** Message history to use for the model */
|
|
138
|
-
readonly messages?: readonly ChatMessage[] | undefined;
|
|
139
|
-
/** Quantization level to apply during import (e.g. `nvfp4`) */
|
|
140
|
-
readonly quantize?: string | undefined;
|
|
141
|
-
/** Quantization level to apply to draft weights during import */
|
|
142
|
-
readonly draft_quantize?: string | undefined;
|
|
143
|
-
/** Minimum Ollama version required by the model */
|
|
144
|
-
readonly requires?: string | undefined;
|
|
145
|
-
/** Stream status updates */
|
|
146
|
-
readonly stream?: boolean | undefined;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
151
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
152
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
153
|
-
*/
|
|
154
|
-
interface DeleteRequest {
|
|
155
|
-
/** Model name to delete */
|
|
156
|
-
readonly model: string;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
161
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
162
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
interface EmbedRequest {
|
|
166
|
-
/** Model name */
|
|
167
|
-
readonly model: string;
|
|
168
|
-
/** Text or array of texts to generate embeddings for */
|
|
169
|
-
readonly input: string | string[];
|
|
170
|
-
/** If true, truncate inputs that exceed the context window. If false, returns an error. */
|
|
171
|
-
readonly truncate?: boolean | undefined;
|
|
172
|
-
/** Number of dimensions to generate embeddings for */
|
|
173
|
-
readonly dimensions?: number | undefined;
|
|
174
|
-
/** Model keep-alive duration */
|
|
175
|
-
readonly keep_alive?: string | undefined;
|
|
176
|
-
readonly options?: ModelOptions | undefined;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
181
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
182
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
183
|
-
*/
|
|
184
|
-
interface EmbedResponse {
|
|
185
|
-
/** Model that produced the embeddings */
|
|
186
|
-
readonly model?: string | undefined;
|
|
187
|
-
/** Array of vector embeddings */
|
|
188
|
-
readonly embeddings?: readonly number[][] | undefined;
|
|
189
|
-
/** Total time spent generating in nanoseconds */
|
|
190
|
-
readonly total_duration?: number | undefined;
|
|
191
|
-
/** Load time in nanoseconds */
|
|
192
|
-
readonly load_duration?: number | undefined;
|
|
193
|
-
/** Number of input tokens processed to generate embeddings */
|
|
194
|
-
readonly prompt_eval_count?: number | undefined;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
199
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
200
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
|
-
interface GenerateRequest {
|
|
204
|
-
/** Model name */
|
|
205
|
-
readonly model: string;
|
|
206
|
-
/** Text for the model to generate a response from */
|
|
207
|
-
readonly prompt?: string | undefined;
|
|
208
|
-
/** Used for fill-in-the-middle models, text that appears after the user prompt and before the model response */
|
|
209
|
-
readonly suffix?: string | undefined;
|
|
210
|
-
readonly images?: readonly string[] | undefined;
|
|
211
|
-
/** Structured output format for the model to generate a response from. Supports either the string `"json"` or a JSON schema object. */
|
|
212
|
-
readonly format?: string | Record<string, unknown> | undefined;
|
|
213
|
-
/** System prompt for the model to generate a response from */
|
|
214
|
-
readonly system?: string | undefined;
|
|
215
|
-
/** When true, returns a stream of partial responses */
|
|
216
|
-
readonly stream?: boolean | undefined;
|
|
217
|
-
readonly think?: ThinkValue | undefined;
|
|
218
|
-
/** When true, returns the raw response from the model without any prompt templating */
|
|
219
|
-
readonly raw?: boolean | undefined;
|
|
220
|
-
/** Model keep-alive duration (for example `5m` or `0` to unload immediately) */
|
|
221
|
-
readonly keep_alive?: string | number | undefined;
|
|
222
|
-
readonly options?: ModelOptions | undefined;
|
|
223
|
-
/** Whether to return log probabilities of the output tokens */
|
|
224
|
-
readonly logprobs?: boolean | undefined;
|
|
225
|
-
/** Number of most likely tokens to return at each token position when logprobs are enabled */
|
|
226
|
-
readonly top_logprobs?: number | undefined;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
231
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
232
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
233
|
-
*/
|
|
234
|
-
|
|
235
|
-
interface GenerateResponse {
|
|
236
|
-
/** Model name */
|
|
237
|
-
readonly model?: string | undefined;
|
|
238
|
-
/** ISO 8601 timestamp of response creation */
|
|
239
|
-
readonly created_at?: string | undefined;
|
|
240
|
-
/** The model's generated text response */
|
|
241
|
-
readonly response?: string | undefined;
|
|
242
|
-
/** The model's generated thinking output */
|
|
243
|
-
readonly thinking?: string | undefined;
|
|
244
|
-
/** Indicates whether generation has finished */
|
|
245
|
-
readonly done?: boolean | undefined;
|
|
246
|
-
/** Reason the generation stopped */
|
|
247
|
-
readonly done_reason?: string | undefined;
|
|
248
|
-
/** Time spent generating the response in nanoseconds */
|
|
249
|
-
readonly total_duration?: number | undefined;
|
|
250
|
-
/** Time spent loading the model in nanoseconds */
|
|
251
|
-
readonly load_duration?: number | undefined;
|
|
252
|
-
/** Number of input tokens in the prompt */
|
|
253
|
-
readonly prompt_eval_count?: number | undefined;
|
|
254
|
-
/** Number of prompt tokens read from the cache */
|
|
255
|
-
readonly prompt_eval_cached_count?: number | undefined;
|
|
256
|
-
/** Time spent evaluating uncached prompt tokens in nanoseconds */
|
|
257
|
-
readonly prompt_eval_duration?: number | undefined;
|
|
258
|
-
/** Number of output tokens generated in the response */
|
|
259
|
-
readonly eval_count?: number | undefined;
|
|
260
|
-
/** Time spent generating tokens in nanoseconds */
|
|
261
|
-
readonly eval_duration?: number | undefined;
|
|
262
|
-
/** Log probability information for the generated tokens when logprobs are enabled */
|
|
263
|
-
readonly logprobs?: readonly Logprob[] | undefined;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
268
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
269
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
270
|
-
*/
|
|
271
|
-
|
|
272
|
-
interface ListResponse {
|
|
273
|
-
readonly models?: readonly ModelSummary[] | undefined;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
278
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
279
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
280
|
-
*/
|
|
281
|
-
|
|
282
|
-
/** Log probability information for a generated token */
|
|
283
|
-
interface Logprob {
|
|
284
|
-
/** The text representation of the token */
|
|
285
|
-
readonly token?: string | undefined;
|
|
286
|
-
/** The log probability of this token */
|
|
287
|
-
readonly logprob?: number | undefined;
|
|
288
|
-
/** The raw byte representation of the token */
|
|
289
|
-
readonly bytes?: readonly number[] | undefined;
|
|
290
|
-
/** Most likely tokens and their log probabilities at this position */
|
|
291
|
-
readonly top_logprobs?: readonly TokenLogprob[] | undefined;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
296
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
297
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
298
|
-
*/
|
|
299
|
-
/** Runtime options that control text generation */
|
|
300
|
-
interface ModelOptions {
|
|
301
|
-
/** Random seed used for reproducible outputs */
|
|
302
|
-
readonly seed?: number | undefined;
|
|
303
|
-
/** Controls randomness in generation (higher = more random) */
|
|
304
|
-
readonly temperature?: number | undefined;
|
|
305
|
-
/** Limits next token selection to the K most likely */
|
|
306
|
-
readonly top_k?: number | undefined;
|
|
307
|
-
/** Cumulative probability threshold for nucleus sampling */
|
|
308
|
-
readonly top_p?: number | undefined;
|
|
309
|
-
/** Minimum probability threshold for token selection */
|
|
310
|
-
readonly min_p?: number | undefined;
|
|
311
|
-
/** Stop sequences that will halt generation */
|
|
312
|
-
readonly stop?: string | string[] | undefined;
|
|
313
|
-
/** Context length size (number of tokens) */
|
|
314
|
-
readonly num_ctx?: number | undefined;
|
|
315
|
-
/** Maximum number of tokens to generate */
|
|
316
|
-
readonly num_predict?: number | undefined;
|
|
317
|
-
[key: string]: unknown;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
322
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
323
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
324
|
-
*/
|
|
325
|
-
/** Summary information for a locally available model */
|
|
326
|
-
interface ModelSummary {
|
|
327
|
-
/** Model name */
|
|
328
|
-
readonly name?: string | undefined;
|
|
329
|
-
/** Model name */
|
|
330
|
-
readonly model?: string | undefined;
|
|
331
|
-
/** Name of the upstream model, if the model is remote */
|
|
332
|
-
readonly remote_model?: string | undefined;
|
|
333
|
-
/** URL of the upstream Ollama host, if the model is remote */
|
|
334
|
-
readonly remote_host?: string | undefined;
|
|
335
|
-
/** Last modified timestamp in ISO 8601 format */
|
|
336
|
-
readonly modified_at?: string | undefined;
|
|
337
|
-
/** Total size of the model on disk in bytes */
|
|
338
|
-
readonly size?: number | undefined;
|
|
339
|
-
/** SHA256 digest identifier of the model contents */
|
|
340
|
-
readonly digest?: string | undefined;
|
|
341
|
-
/** Additional information about the model's format and family */
|
|
342
|
-
readonly details?: {
|
|
343
|
-
/** Model file format (for example `gguf`) */
|
|
344
|
-
readonly format?: string | undefined;
|
|
345
|
-
/** Primary model family (for example `llama`) */
|
|
346
|
-
readonly family?: string | undefined;
|
|
347
|
-
/** All families the model belongs to, when applicable */
|
|
348
|
-
readonly families?: readonly string[] | undefined;
|
|
349
|
-
/** Approximate parameter count label (for example `7B`, `13B`) */
|
|
350
|
-
readonly parameter_size?: string | undefined;
|
|
351
|
-
/** Quantization level used (for example `Q4_0`) */
|
|
352
|
-
readonly quantization_level?: string | undefined;
|
|
353
|
-
} | undefined;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
358
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
359
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
360
|
-
*/
|
|
361
|
-
interface Ps {
|
|
362
|
-
/** Name of the running model */
|
|
363
|
-
readonly name?: string | undefined;
|
|
364
|
-
/** Name of the running model */
|
|
365
|
-
readonly model?: string | undefined;
|
|
366
|
-
/** Size of the model in bytes */
|
|
367
|
-
readonly size?: number | undefined;
|
|
368
|
-
/** SHA256 digest of the model */
|
|
369
|
-
readonly digest?: string | undefined;
|
|
370
|
-
/** Model details such as format and family */
|
|
371
|
-
readonly details?: Record<string, unknown> | undefined;
|
|
372
|
-
/** Time when the model will be unloaded */
|
|
373
|
-
readonly expires_at?: string | undefined;
|
|
374
|
-
/** VRAM usage in bytes */
|
|
375
|
-
readonly size_vram?: number | undefined;
|
|
376
|
-
/** Context length for the running model */
|
|
377
|
-
readonly context_length?: number | undefined;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
382
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
383
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
384
|
-
*/
|
|
385
|
-
|
|
386
|
-
interface PsResponse {
|
|
387
|
-
/** Currently running models */
|
|
388
|
-
readonly models?: readonly Ps[] | undefined;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
393
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
394
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
395
|
-
*/
|
|
396
|
-
interface PullRequest {
|
|
397
|
-
/** Name of the model to download */
|
|
398
|
-
readonly model: string;
|
|
399
|
-
/** Allow downloading over insecure connections */
|
|
400
|
-
readonly insecure?: boolean | undefined;
|
|
401
|
-
/** Stream progress updates */
|
|
402
|
-
readonly stream?: boolean | undefined;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
407
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
408
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
409
|
-
*/
|
|
410
|
-
interface PushRequest {
|
|
411
|
-
/** Name of the model to publish */
|
|
412
|
-
readonly model: string;
|
|
413
|
-
/** Allow publishing over insecure connections */
|
|
414
|
-
readonly insecure?: boolean | undefined;
|
|
415
|
-
/** Stream progress updates */
|
|
416
|
-
readonly stream?: boolean | undefined;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
421
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
422
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
423
|
-
*/
|
|
424
|
-
interface ShowRequest {
|
|
425
|
-
/** Model name to show */
|
|
426
|
-
readonly model: string;
|
|
427
|
-
/** If true, includes large verbose fields in the response. */
|
|
428
|
-
readonly verbose?: boolean | undefined;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
433
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
434
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
435
|
-
*/
|
|
436
|
-
|
|
437
|
-
interface ShowResponse {
|
|
438
|
-
readonly thinking?: Thinking | undefined;
|
|
439
|
-
/** Model parameter settings serialized as text */
|
|
440
|
-
readonly parameters?: string | undefined;
|
|
441
|
-
/** The license of the model */
|
|
442
|
-
readonly license?: string | undefined;
|
|
443
|
-
/** Last modified timestamp in ISO 8601 format */
|
|
444
|
-
readonly modified_at?: string | undefined;
|
|
445
|
-
/** High-level model details */
|
|
446
|
-
readonly details?: Record<string, unknown> | undefined;
|
|
447
|
-
/** The template used by the model to render prompts */
|
|
448
|
-
readonly template?: string | undefined;
|
|
449
|
-
/** List of supported features */
|
|
450
|
-
readonly capabilities?: readonly string[] | undefined;
|
|
451
|
-
/** Additional model metadata */
|
|
452
|
-
readonly model_info?: Record<string, unknown> | undefined;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
457
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
458
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
459
|
-
*/
|
|
460
|
-
interface StatusResponse {
|
|
461
|
-
/** Current status message */
|
|
462
|
-
readonly status?: string | undefined;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
467
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
468
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
469
|
-
*/
|
|
470
|
-
/** Controls a model's thinking output. Use `/api/show` to discover the supported values and default for the selected model. `true` requests thinking, `false` requests no thinking output, and `null` uses the model default. String values are model-defined; supported names must match `/api/show` exactly. Numbers are not supported. */
|
|
471
|
-
type ThinkValue = boolean | string | null;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
475
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
476
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
477
|
-
*/
|
|
478
|
-
/** Thinking controls advertised by a model. Models without thinking metadata omit this field. */
|
|
479
|
-
interface Thinking {
|
|
480
|
-
/** Values explicitly supported by the model's `think` request field. Booleans represent on/off controls and strings represent model-defined levels. An array containing only `false` identifies a model without thinking support. */
|
|
481
|
-
readonly values: readonly (boolean | string)[];
|
|
482
|
-
/** Value used when `think` is not set. For models that use this metadata for named thinking levels, unsupported names resolve to this default. */
|
|
483
|
-
readonly default: boolean | string;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
488
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
489
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
490
|
-
*/
|
|
491
|
-
/** Log probability information for a single token alternative */
|
|
492
|
-
interface TokenLogprob {
|
|
493
|
-
/** The text representation of the token */
|
|
494
|
-
readonly token?: string | undefined;
|
|
495
|
-
/** The log probability of this token */
|
|
496
|
-
readonly logprob?: number | undefined;
|
|
497
|
-
/** The raw byte representation of the token */
|
|
498
|
-
readonly bytes?: readonly number[] | undefined;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
503
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
504
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
505
|
-
*/
|
|
506
|
-
interface ToolCall {
|
|
507
|
-
readonly function?: {
|
|
508
|
-
/** Name of the function to call */
|
|
509
|
-
readonly name: string;
|
|
510
|
-
/** What the function does */
|
|
511
|
-
readonly description?: string | undefined;
|
|
512
|
-
/** JSON object of arguments to pass to the function */
|
|
513
|
-
readonly arguments?: Record<string, unknown> | undefined;
|
|
514
|
-
} | undefined;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
519
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
520
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
521
|
-
*/
|
|
522
|
-
interface ToolDefinition {
|
|
523
|
-
/** Type of tool (always `function`) */
|
|
524
|
-
readonly type: 'function';
|
|
525
|
-
readonly function: {
|
|
526
|
-
/** Function name exposed to the model */
|
|
527
|
-
readonly name: string;
|
|
528
|
-
/** Human-readable description of the function */
|
|
529
|
-
readonly description?: string | undefined;
|
|
530
|
-
/** JSON Schema for the function parameters */
|
|
531
|
-
readonly parameters: Record<string, unknown>;
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
537
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
538
|
-
* See ADR 0013 and ADR 0014 for the contract-first architecture.
|
|
539
|
-
*/
|
|
540
|
-
interface VersionResponse {
|
|
541
|
-
/** Version of Ollama */
|
|
542
|
-
readonly version?: string | undefined;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
547
|
-
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
548
|
-
* Each generated class delegates to OllamaRuntime — the runtime owns
|
|
549
|
-
* transport, retry, streaming, telemetry, and error handling.
|
|
550
|
-
*/
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Generated API surface for Ollama's native domain.
|
|
554
|
-
* Each method delegates to {@link OllamaRuntime.invoke}.
|
|
555
|
-
*/
|
|
556
|
-
declare class NativeApi {
|
|
557
|
-
private readonly runtime;
|
|
558
|
-
constructor(runtime: OllamaRuntime);
|
|
559
|
-
blobs(options?: {
|
|
560
|
-
signal?: AbortSignal;
|
|
561
|
-
}): Promise<unknown>;
|
|
562
|
-
chat(request: ChatRequest & {
|
|
563
|
-
stream?: false;
|
|
564
|
-
}): Promise<ChatResponse>;
|
|
565
|
-
chat(request: ChatRequest & {
|
|
566
|
-
stream: true;
|
|
567
|
-
}): Promise<AsyncGenerator<ChatResponse, void, undefined>>;
|
|
568
|
-
copy(request: CopyRequest): Promise<unknown>;
|
|
569
|
-
create(request: CreateRequest & {
|
|
570
|
-
stream?: false;
|
|
571
|
-
}): Promise<StatusResponse>;
|
|
572
|
-
create(request: CreateRequest & {
|
|
573
|
-
stream: true;
|
|
574
|
-
}): Promise<AsyncGenerator<StatusResponse, void, undefined>>;
|
|
575
|
-
delete(request: DeleteRequest): Promise<unknown>;
|
|
576
|
-
embed(request: EmbedRequest): Promise<EmbedResponse>;
|
|
577
|
-
generate(request: GenerateRequest & {
|
|
578
|
-
stream?: false;
|
|
579
|
-
}): Promise<GenerateResponse>;
|
|
580
|
-
generate(request: GenerateRequest & {
|
|
581
|
-
stream: true;
|
|
582
|
-
}): Promise<AsyncGenerator<GenerateResponse, void, undefined>>;
|
|
583
|
-
ps(options?: {
|
|
584
|
-
signal?: AbortSignal;
|
|
585
|
-
}): Promise<PsResponse>;
|
|
586
|
-
pull(request: PullRequest & {
|
|
587
|
-
stream?: false;
|
|
588
|
-
}): Promise<StatusResponse>;
|
|
589
|
-
pull(request: PullRequest & {
|
|
590
|
-
stream: true;
|
|
591
|
-
}): Promise<AsyncGenerator<StatusResponse, void, undefined>>;
|
|
592
|
-
push(request: PushRequest & {
|
|
593
|
-
stream?: false;
|
|
594
|
-
}): Promise<StatusResponse>;
|
|
595
|
-
push(request: PushRequest & {
|
|
596
|
-
stream: true;
|
|
597
|
-
}): Promise<AsyncGenerator<StatusResponse, void, undefined>>;
|
|
598
|
-
show(request: ShowRequest): Promise<ShowResponse>;
|
|
599
|
-
systemOne(request: Record<string, unknown>): Promise<unknown>;
|
|
600
|
-
tags(options?: {
|
|
601
|
-
signal?: AbortSignal;
|
|
602
|
-
}): Promise<ListResponse>;
|
|
603
|
-
version(options?: {
|
|
604
|
-
signal?: AbortSignal;
|
|
605
|
-
}): Promise<VersionResponse>;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
8
|
/**
|
|
609
9
|
* AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
|
|
610
10
|
* Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
|
|
@@ -619,31 +19,31 @@ declare class NativeApi {
|
|
|
619
19
|
declare class OpenAIApi {
|
|
620
20
|
private readonly runtime;
|
|
621
21
|
constructor(runtime: OllamaRuntime);
|
|
622
|
-
openaiChatCompletions(request:
|
|
22
|
+
openaiChatCompletions(request: OpenAIChatCompletionRequest & {
|
|
623
23
|
stream?: false;
|
|
624
|
-
}): Promise<
|
|
625
|
-
openaiChatCompletions(request:
|
|
24
|
+
}): Promise<OpenAIChatCompletionResponse>;
|
|
25
|
+
openaiChatCompletions(request: OpenAIChatCompletionRequest & {
|
|
626
26
|
stream: true;
|
|
627
|
-
}): Promise<AsyncGenerator<
|
|
628
|
-
openaiCompletions(request:
|
|
27
|
+
}): Promise<AsyncGenerator<OpenAIChatCompletionChunk, void, undefined>>;
|
|
28
|
+
openaiCompletions(request: OpenAICompletionRequest & {
|
|
629
29
|
stream?: false;
|
|
630
|
-
}): Promise<
|
|
631
|
-
openaiCompletions(request:
|
|
30
|
+
}): Promise<OpenAICompletionResponse>;
|
|
31
|
+
openaiCompletions(request: OpenAICompletionRequest & {
|
|
632
32
|
stream: true;
|
|
633
|
-
}): Promise<AsyncGenerator<
|
|
634
|
-
openaiEmbeddings(request:
|
|
33
|
+
}): Promise<AsyncGenerator<OpenAICompletionChunk, void, undefined>>;
|
|
34
|
+
openaiEmbeddings(request: OpenAIEmbeddingRequest): Promise<OpenAIEmbeddingResponse>;
|
|
635
35
|
openaiModels(options?: {
|
|
636
36
|
signal?: AbortSignal;
|
|
637
|
-
}): Promise<
|
|
638
|
-
openaiModelsGetOne(options?: {
|
|
37
|
+
}): Promise<OpenAIListModelsResponse>;
|
|
38
|
+
openaiModelsGetOne(model: string, options?: {
|
|
639
39
|
signal?: AbortSignal;
|
|
640
|
-
}): Promise<
|
|
641
|
-
openaiResponses(request:
|
|
40
|
+
}): Promise<OpenAIModelItem>;
|
|
41
|
+
openaiResponses(request: OpenAIResponsesRequest & {
|
|
642
42
|
stream?: false;
|
|
643
|
-
}): Promise<
|
|
644
|
-
openaiResponses(request:
|
|
43
|
+
}): Promise<OpenAIResponsesResponse>;
|
|
44
|
+
openaiResponses(request: OpenAIResponsesRequest & {
|
|
645
45
|
stream: true;
|
|
646
|
-
}): Promise<AsyncGenerator<
|
|
46
|
+
}): Promise<AsyncGenerator<OpenAIResponsesStreamEvent, void, undefined>>;
|
|
647
47
|
}
|
|
648
48
|
|
|
649
49
|
/**
|
|
@@ -660,12 +60,12 @@ declare class OpenAIApi {
|
|
|
660
60
|
declare class AnthropicApi {
|
|
661
61
|
private readonly runtime;
|
|
662
62
|
constructor(runtime: OllamaRuntime);
|
|
663
|
-
anthropicMessages(request:
|
|
63
|
+
anthropicMessages(request: AnthropicMessagesRequest & {
|
|
664
64
|
stream?: false;
|
|
665
|
-
}): Promise<
|
|
666
|
-
anthropicMessages(request:
|
|
65
|
+
}): Promise<AnthropicMessagesResponse>;
|
|
66
|
+
anthropicMessages(request: AnthropicMessagesRequest & {
|
|
667
67
|
stream: true;
|
|
668
|
-
}): Promise<AsyncGenerator<
|
|
68
|
+
}): Promise<AsyncGenerator<AnthropicMessageStreamEvent, void, undefined>>;
|
|
669
69
|
}
|
|
670
70
|
|
|
671
71
|
/**
|
|
@@ -674,6 +74,29 @@ declare class AnthropicApi {
|
|
|
674
74
|
* Each OperationDefinition captures what Ollama exposes; the runtime
|
|
675
75
|
* in src/generated/runtime/runtime.ts captures how the SDK behaves.
|
|
676
76
|
*/
|
|
77
|
+
declare const balanceOp: {
|
|
78
|
+
readonly operationId: "balance";
|
|
79
|
+
readonly method: "GET";
|
|
80
|
+
readonly path: "/api/balance";
|
|
81
|
+
readonly response: {
|
|
82
|
+
readonly $ref: "#/schemas/BalanceResponse";
|
|
83
|
+
};
|
|
84
|
+
readonly environment: {
|
|
85
|
+
readonly local: false;
|
|
86
|
+
readonly cloud: true;
|
|
87
|
+
};
|
|
88
|
+
readonly host: "https://ollama.com";
|
|
89
|
+
readonly transport: {
|
|
90
|
+
readonly mode: "json";
|
|
91
|
+
readonly streaming: false;
|
|
92
|
+
};
|
|
93
|
+
readonly capabilities: {};
|
|
94
|
+
readonly status: {
|
|
95
|
+
readonly documented: true;
|
|
96
|
+
};
|
|
97
|
+
readonly domain: "native";
|
|
98
|
+
readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Takes no parameters. For usage history see the usage operation.", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.balance() — the generated NativeApi class does not expose this operation."];
|
|
99
|
+
};
|
|
677
100
|
declare const blobsOp: {
|
|
678
101
|
readonly operationId: "blobs";
|
|
679
102
|
readonly method: "HEAD";
|
|
@@ -682,6 +105,14 @@ declare const blobsOp: {
|
|
|
682
105
|
readonly local: true;
|
|
683
106
|
readonly cloud: false;
|
|
684
107
|
};
|
|
108
|
+
readonly parameters: readonly [{
|
|
109
|
+
readonly name: "digest";
|
|
110
|
+
readonly in: "path";
|
|
111
|
+
readonly required: true;
|
|
112
|
+
readonly schema: {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
};
|
|
115
|
+
}];
|
|
685
116
|
readonly transport: {
|
|
686
117
|
readonly mode: "json";
|
|
687
118
|
readonly streaming: false;
|
|
@@ -775,6 +206,33 @@ declare const createOp: {
|
|
|
775
206
|
readonly domain: "native";
|
|
776
207
|
readonly notes: readonly ["Model creation is local-only; Ollama Cloud does not support it."];
|
|
777
208
|
};
|
|
209
|
+
declare const createBlobOp: {
|
|
210
|
+
readonly operationId: "createBlob";
|
|
211
|
+
readonly method: "POST";
|
|
212
|
+
readonly path: "/api/blobs/{digest}";
|
|
213
|
+
readonly environment: {
|
|
214
|
+
readonly local: true;
|
|
215
|
+
readonly cloud: false;
|
|
216
|
+
};
|
|
217
|
+
readonly parameters: readonly [{
|
|
218
|
+
readonly name: "digest";
|
|
219
|
+
readonly in: "path";
|
|
220
|
+
readonly required: true;
|
|
221
|
+
readonly schema: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
};
|
|
224
|
+
}];
|
|
225
|
+
readonly transport: {
|
|
226
|
+
readonly mode: "json";
|
|
227
|
+
readonly streaming: false;
|
|
228
|
+
};
|
|
229
|
+
readonly capabilities: {};
|
|
230
|
+
readonly status: {
|
|
231
|
+
readonly documented: true;
|
|
232
|
+
};
|
|
233
|
+
readonly domain: "native";
|
|
234
|
+
readonly notes: readonly ["POST endpoint for blob creation; takes a binary body (application/octet-stream).", "Handled by OllamaClient.createBlob() — the generated NativeApi does not expose this operation because the runtime JSON-encodes request bodies."];
|
|
235
|
+
};
|
|
778
236
|
declare const deleteOp: {
|
|
779
237
|
readonly operationId: "delete";
|
|
780
238
|
readonly method: "DELETE";
|
|
@@ -952,6 +410,12 @@ declare const systemOneOp: {
|
|
|
952
410
|
readonly operationId: "systemOne";
|
|
953
411
|
readonly method: "POST";
|
|
954
412
|
readonly path: "/v1/systemone";
|
|
413
|
+
readonly request: {
|
|
414
|
+
readonly $ref: "#/schemas/SystemOneRequest";
|
|
415
|
+
};
|
|
416
|
+
readonly response: {
|
|
417
|
+
readonly $ref: "#/schemas/SystemOneResponse";
|
|
418
|
+
};
|
|
955
419
|
readonly environment: {
|
|
956
420
|
readonly local: true;
|
|
957
421
|
readonly cloud: false;
|
|
@@ -963,7 +427,7 @@ declare const systemOneOp: {
|
|
|
963
427
|
readonly capabilities: {
|
|
964
428
|
readonly thinking: "unsupported";
|
|
965
429
|
readonly tools: "unsupported";
|
|
966
|
-
readonly vision: "
|
|
430
|
+
readonly vision: "model-dependent";
|
|
967
431
|
readonly structuredOutput: "unsupported";
|
|
968
432
|
readonly logprobs: "unsupported";
|
|
969
433
|
readonly embeddings: "unsupported";
|
|
@@ -971,13 +435,14 @@ declare const systemOneOp: {
|
|
|
971
435
|
readonly constraints: {
|
|
972
436
|
readonly minOllamaVersion: "0.35.0";
|
|
973
437
|
readonly maxRequestBytes: 65536;
|
|
438
|
+
readonly maxRequestBytesWithImages: 33554432;
|
|
974
439
|
};
|
|
975
440
|
readonly status: {
|
|
976
441
|
readonly documented: true;
|
|
977
442
|
readonly experimental: true;
|
|
978
443
|
};
|
|
979
444
|
readonly domain: "native";
|
|
980
|
-
readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "
|
|
445
|
+
readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "64 KiB request limit without images, 32 MiB with images (includes JSON/base64 overhead).", "No tools, no generation controls (temperature, top_p, etc.).", "Vision is model-dependent: images are accepted by vision-weighted models (Clef/Clef Flash) but not by text-only models.", "Experimental: behavioral surface may change between Ollama releases."];
|
|
981
446
|
};
|
|
982
447
|
declare const tagsOp: {
|
|
983
448
|
readonly operationId: "tags";
|
|
@@ -1000,6 +465,29 @@ declare const tagsOp: {
|
|
|
1000
465
|
};
|
|
1001
466
|
readonly domain: "native";
|
|
1002
467
|
};
|
|
468
|
+
declare const usageOp: {
|
|
469
|
+
readonly operationId: "usage";
|
|
470
|
+
readonly method: "GET";
|
|
471
|
+
readonly path: "/api/usage";
|
|
472
|
+
readonly response: {
|
|
473
|
+
readonly $ref: "#/schemas/UsageResponse";
|
|
474
|
+
};
|
|
475
|
+
readonly environment: {
|
|
476
|
+
readonly local: false;
|
|
477
|
+
readonly cloud: true;
|
|
478
|
+
};
|
|
479
|
+
readonly host: "https://ollama.com";
|
|
480
|
+
readonly transport: {
|
|
481
|
+
readonly mode: "json";
|
|
482
|
+
readonly streaming: false;
|
|
483
|
+
};
|
|
484
|
+
readonly capabilities: {};
|
|
485
|
+
readonly status: {
|
|
486
|
+
readonly documented: true;
|
|
487
|
+
};
|
|
488
|
+
readonly domain: "native";
|
|
489
|
+
readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
|
|
490
|
+
};
|
|
1003
491
|
declare const versionOp: {
|
|
1004
492
|
readonly operationId: "version";
|
|
1005
493
|
readonly method: "GET";
|
|
@@ -1021,6 +509,58 @@ declare const versionOp: {
|
|
|
1021
509
|
};
|
|
1022
510
|
readonly domain: "native";
|
|
1023
511
|
};
|
|
512
|
+
declare const webFetchOp: {
|
|
513
|
+
readonly operationId: "webFetch";
|
|
514
|
+
readonly method: "POST";
|
|
515
|
+
readonly path: "/api/web_fetch";
|
|
516
|
+
readonly request: {
|
|
517
|
+
readonly $ref: "#/schemas/WebFetchRequest";
|
|
518
|
+
};
|
|
519
|
+
readonly response: {
|
|
520
|
+
readonly $ref: "#/schemas/WebFetchResponse";
|
|
521
|
+
};
|
|
522
|
+
readonly environment: {
|
|
523
|
+
readonly local: false;
|
|
524
|
+
readonly cloud: true;
|
|
525
|
+
};
|
|
526
|
+
readonly host: "https://ollama.com";
|
|
527
|
+
readonly transport: {
|
|
528
|
+
readonly mode: "json";
|
|
529
|
+
readonly streaming: false;
|
|
530
|
+
};
|
|
531
|
+
readonly capabilities: {};
|
|
532
|
+
readonly status: {
|
|
533
|
+
readonly documented: true;
|
|
534
|
+
};
|
|
535
|
+
readonly domain: "native";
|
|
536
|
+
readonly notes: readonly ["Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Use OllamaClient.webFetch() — the generated NativeApi class does not expose this operation."];
|
|
537
|
+
};
|
|
538
|
+
declare const webSearchOp: {
|
|
539
|
+
readonly operationId: "webSearch";
|
|
540
|
+
readonly method: "POST";
|
|
541
|
+
readonly path: "/api/web_search";
|
|
542
|
+
readonly request: {
|
|
543
|
+
readonly $ref: "#/schemas/WebSearchRequest";
|
|
544
|
+
};
|
|
545
|
+
readonly response: {
|
|
546
|
+
readonly $ref: "#/schemas/WebSearchResponse";
|
|
547
|
+
};
|
|
548
|
+
readonly environment: {
|
|
549
|
+
readonly local: false;
|
|
550
|
+
readonly cloud: true;
|
|
551
|
+
};
|
|
552
|
+
readonly host: "https://ollama.com";
|
|
553
|
+
readonly transport: {
|
|
554
|
+
readonly mode: "json";
|
|
555
|
+
readonly streaming: false;
|
|
556
|
+
};
|
|
557
|
+
readonly capabilities: {};
|
|
558
|
+
readonly status: {
|
|
559
|
+
readonly documented: true;
|
|
560
|
+
};
|
|
561
|
+
readonly domain: "native";
|
|
562
|
+
readonly notes: readonly ["Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Use OllamaClient.webSearch() — the generated NativeApi class does not expose this operation."];
|
|
563
|
+
};
|
|
1024
564
|
declare const openaiChatCompletionsOp: {
|
|
1025
565
|
readonly operationId: "openaiChatCompletions";
|
|
1026
566
|
readonly method: "POST";
|
|
@@ -1114,6 +654,14 @@ declare const openaiModelsGetOneOp: {
|
|
|
1114
654
|
readonly local: true;
|
|
1115
655
|
readonly cloud: true;
|
|
1116
656
|
};
|
|
657
|
+
readonly parameters: readonly [{
|
|
658
|
+
readonly name: "model";
|
|
659
|
+
readonly in: "path";
|
|
660
|
+
readonly required: true;
|
|
661
|
+
readonly schema: {
|
|
662
|
+
readonly type: "string";
|
|
663
|
+
};
|
|
664
|
+
}];
|
|
1117
665
|
readonly transport: {
|
|
1118
666
|
readonly mode: "json";
|
|
1119
667
|
readonly streaming: false;
|
|
@@ -1172,6 +720,28 @@ declare const anthropicMessagesOp: {
|
|
|
1172
720
|
readonly notes: readonly ["tool_choice and metadata are explicitly unsupported by Ollama's Anthropic compat layer.", "Nested cache_control fields under messages[].content[].cache_control are unsupported."];
|
|
1173
721
|
};
|
|
1174
722
|
declare const allOperations: readonly [{
|
|
723
|
+
readonly operationId: "balance";
|
|
724
|
+
readonly method: "GET";
|
|
725
|
+
readonly path: "/api/balance";
|
|
726
|
+
readonly response: {
|
|
727
|
+
readonly $ref: "#/schemas/BalanceResponse";
|
|
728
|
+
};
|
|
729
|
+
readonly environment: {
|
|
730
|
+
readonly local: false;
|
|
731
|
+
readonly cloud: true;
|
|
732
|
+
};
|
|
733
|
+
readonly host: "https://ollama.com";
|
|
734
|
+
readonly transport: {
|
|
735
|
+
readonly mode: "json";
|
|
736
|
+
readonly streaming: false;
|
|
737
|
+
};
|
|
738
|
+
readonly capabilities: {};
|
|
739
|
+
readonly status: {
|
|
740
|
+
readonly documented: true;
|
|
741
|
+
};
|
|
742
|
+
readonly domain: "native";
|
|
743
|
+
readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Takes no parameters. For usage history see the usage operation.", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.balance() — the generated NativeApi class does not expose this operation."];
|
|
744
|
+
}, {
|
|
1175
745
|
readonly operationId: "blobs";
|
|
1176
746
|
readonly method: "HEAD";
|
|
1177
747
|
readonly path: "/api/blobs/{digest}";
|
|
@@ -1179,6 +749,14 @@ declare const allOperations: readonly [{
|
|
|
1179
749
|
readonly local: true;
|
|
1180
750
|
readonly cloud: false;
|
|
1181
751
|
};
|
|
752
|
+
readonly parameters: readonly [{
|
|
753
|
+
readonly name: "digest";
|
|
754
|
+
readonly in: "path";
|
|
755
|
+
readonly required: true;
|
|
756
|
+
readonly schema: {
|
|
757
|
+
readonly type: "string";
|
|
758
|
+
};
|
|
759
|
+
}];
|
|
1182
760
|
readonly transport: {
|
|
1183
761
|
readonly mode: "json";
|
|
1184
762
|
readonly streaming: false;
|
|
@@ -1268,6 +846,32 @@ declare const allOperations: readonly [{
|
|
|
1268
846
|
};
|
|
1269
847
|
readonly domain: "native";
|
|
1270
848
|
readonly notes: readonly ["Model creation is local-only; Ollama Cloud does not support it."];
|
|
849
|
+
}, {
|
|
850
|
+
readonly operationId: "createBlob";
|
|
851
|
+
readonly method: "POST";
|
|
852
|
+
readonly path: "/api/blobs/{digest}";
|
|
853
|
+
readonly environment: {
|
|
854
|
+
readonly local: true;
|
|
855
|
+
readonly cloud: false;
|
|
856
|
+
};
|
|
857
|
+
readonly parameters: readonly [{
|
|
858
|
+
readonly name: "digest";
|
|
859
|
+
readonly in: "path";
|
|
860
|
+
readonly required: true;
|
|
861
|
+
readonly schema: {
|
|
862
|
+
readonly type: "string";
|
|
863
|
+
};
|
|
864
|
+
}];
|
|
865
|
+
readonly transport: {
|
|
866
|
+
readonly mode: "json";
|
|
867
|
+
readonly streaming: false;
|
|
868
|
+
};
|
|
869
|
+
readonly capabilities: {};
|
|
870
|
+
readonly status: {
|
|
871
|
+
readonly documented: true;
|
|
872
|
+
};
|
|
873
|
+
readonly domain: "native";
|
|
874
|
+
readonly notes: readonly ["POST endpoint for blob creation; takes a binary body (application/octet-stream).", "Handled by OllamaClient.createBlob() — the generated NativeApi does not expose this operation because the runtime JSON-encodes request bodies."];
|
|
1271
875
|
}, {
|
|
1272
876
|
readonly operationId: "delete";
|
|
1273
877
|
readonly method: "DELETE";
|
|
@@ -1438,6 +1042,12 @@ declare const allOperations: readonly [{
|
|
|
1438
1042
|
readonly operationId: "systemOne";
|
|
1439
1043
|
readonly method: "POST";
|
|
1440
1044
|
readonly path: "/v1/systemone";
|
|
1045
|
+
readonly request: {
|
|
1046
|
+
readonly $ref: "#/schemas/SystemOneRequest";
|
|
1047
|
+
};
|
|
1048
|
+
readonly response: {
|
|
1049
|
+
readonly $ref: "#/schemas/SystemOneResponse";
|
|
1050
|
+
};
|
|
1441
1051
|
readonly environment: {
|
|
1442
1052
|
readonly local: true;
|
|
1443
1053
|
readonly cloud: false;
|
|
@@ -1449,7 +1059,7 @@ declare const allOperations: readonly [{
|
|
|
1449
1059
|
readonly capabilities: {
|
|
1450
1060
|
readonly thinking: "unsupported";
|
|
1451
1061
|
readonly tools: "unsupported";
|
|
1452
|
-
readonly vision: "
|
|
1062
|
+
readonly vision: "model-dependent";
|
|
1453
1063
|
readonly structuredOutput: "unsupported";
|
|
1454
1064
|
readonly logprobs: "unsupported";
|
|
1455
1065
|
readonly embeddings: "unsupported";
|
|
@@ -1457,13 +1067,14 @@ declare const allOperations: readonly [{
|
|
|
1457
1067
|
readonly constraints: {
|
|
1458
1068
|
readonly minOllamaVersion: "0.35.0";
|
|
1459
1069
|
readonly maxRequestBytes: 65536;
|
|
1070
|
+
readonly maxRequestBytesWithImages: 33554432;
|
|
1460
1071
|
};
|
|
1461
1072
|
readonly status: {
|
|
1462
1073
|
readonly documented: true;
|
|
1463
1074
|
readonly experimental: true;
|
|
1464
1075
|
};
|
|
1465
1076
|
readonly domain: "native";
|
|
1466
|
-
readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "
|
|
1077
|
+
readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "64 KiB request limit without images, 32 MiB with images (includes JSON/base64 overhead).", "No tools, no generation controls (temperature, top_p, etc.).", "Vision is model-dependent: images are accepted by vision-weighted models (Clef/Clef Flash) but not by text-only models.", "Experimental: behavioral surface may change between Ollama releases."];
|
|
1467
1078
|
}, {
|
|
1468
1079
|
readonly operationId: "tags";
|
|
1469
1080
|
readonly method: "GET";
|
|
@@ -1484,6 +1095,28 @@ declare const allOperations: readonly [{
|
|
|
1484
1095
|
readonly documented: true;
|
|
1485
1096
|
};
|
|
1486
1097
|
readonly domain: "native";
|
|
1098
|
+
}, {
|
|
1099
|
+
readonly operationId: "usage";
|
|
1100
|
+
readonly method: "GET";
|
|
1101
|
+
readonly path: "/api/usage";
|
|
1102
|
+
readonly response: {
|
|
1103
|
+
readonly $ref: "#/schemas/UsageResponse";
|
|
1104
|
+
};
|
|
1105
|
+
readonly environment: {
|
|
1106
|
+
readonly local: false;
|
|
1107
|
+
readonly cloud: true;
|
|
1108
|
+
};
|
|
1109
|
+
readonly host: "https://ollama.com";
|
|
1110
|
+
readonly transport: {
|
|
1111
|
+
readonly mode: "json";
|
|
1112
|
+
readonly streaming: false;
|
|
1113
|
+
};
|
|
1114
|
+
readonly capabilities: {};
|
|
1115
|
+
readonly status: {
|
|
1116
|
+
readonly documented: true;
|
|
1117
|
+
};
|
|
1118
|
+
readonly domain: "native";
|
|
1119
|
+
readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
|
|
1487
1120
|
}, {
|
|
1488
1121
|
readonly operationId: "version";
|
|
1489
1122
|
readonly method: "GET";
|
|
@@ -1504,6 +1137,56 @@ declare const allOperations: readonly [{
|
|
|
1504
1137
|
readonly documented: true;
|
|
1505
1138
|
};
|
|
1506
1139
|
readonly domain: "native";
|
|
1140
|
+
}, {
|
|
1141
|
+
readonly operationId: "webFetch";
|
|
1142
|
+
readonly method: "POST";
|
|
1143
|
+
readonly path: "/api/web_fetch";
|
|
1144
|
+
readonly request: {
|
|
1145
|
+
readonly $ref: "#/schemas/WebFetchRequest";
|
|
1146
|
+
};
|
|
1147
|
+
readonly response: {
|
|
1148
|
+
readonly $ref: "#/schemas/WebFetchResponse";
|
|
1149
|
+
};
|
|
1150
|
+
readonly environment: {
|
|
1151
|
+
readonly local: false;
|
|
1152
|
+
readonly cloud: true;
|
|
1153
|
+
};
|
|
1154
|
+
readonly host: "https://ollama.com";
|
|
1155
|
+
readonly transport: {
|
|
1156
|
+
readonly mode: "json";
|
|
1157
|
+
readonly streaming: false;
|
|
1158
|
+
};
|
|
1159
|
+
readonly capabilities: {};
|
|
1160
|
+
readonly status: {
|
|
1161
|
+
readonly documented: true;
|
|
1162
|
+
};
|
|
1163
|
+
readonly domain: "native";
|
|
1164
|
+
readonly notes: readonly ["Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Use OllamaClient.webFetch() — the generated NativeApi class does not expose this operation."];
|
|
1165
|
+
}, {
|
|
1166
|
+
readonly operationId: "webSearch";
|
|
1167
|
+
readonly method: "POST";
|
|
1168
|
+
readonly path: "/api/web_search";
|
|
1169
|
+
readonly request: {
|
|
1170
|
+
readonly $ref: "#/schemas/WebSearchRequest";
|
|
1171
|
+
};
|
|
1172
|
+
readonly response: {
|
|
1173
|
+
readonly $ref: "#/schemas/WebSearchResponse";
|
|
1174
|
+
};
|
|
1175
|
+
readonly environment: {
|
|
1176
|
+
readonly local: false;
|
|
1177
|
+
readonly cloud: true;
|
|
1178
|
+
};
|
|
1179
|
+
readonly host: "https://ollama.com";
|
|
1180
|
+
readonly transport: {
|
|
1181
|
+
readonly mode: "json";
|
|
1182
|
+
readonly streaming: false;
|
|
1183
|
+
};
|
|
1184
|
+
readonly capabilities: {};
|
|
1185
|
+
readonly status: {
|
|
1186
|
+
readonly documented: true;
|
|
1187
|
+
};
|
|
1188
|
+
readonly domain: "native";
|
|
1189
|
+
readonly notes: readonly ["Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Use OllamaClient.webSearch() — the generated NativeApi class does not expose this operation."];
|
|
1507
1190
|
}, {
|
|
1508
1191
|
readonly operationId: "openaiChatCompletions";
|
|
1509
1192
|
readonly method: "POST";
|
|
@@ -1593,6 +1276,14 @@ declare const allOperations: readonly [{
|
|
|
1593
1276
|
readonly local: true;
|
|
1594
1277
|
readonly cloud: true;
|
|
1595
1278
|
};
|
|
1279
|
+
readonly parameters: readonly [{
|
|
1280
|
+
readonly name: "model";
|
|
1281
|
+
readonly in: "path";
|
|
1282
|
+
readonly required: true;
|
|
1283
|
+
readonly schema: {
|
|
1284
|
+
readonly type: "string";
|
|
1285
|
+
};
|
|
1286
|
+
}];
|
|
1596
1287
|
readonly transport: {
|
|
1597
1288
|
readonly mode: "json";
|
|
1598
1289
|
readonly streaming: false;
|
|
@@ -1649,4 +1340,4 @@ declare const allOperations: readonly [{
|
|
|
1649
1340
|
readonly notes: readonly ["tool_choice and metadata are explicitly unsupported by Ollama's Anthropic compat layer.", "Nested cache_control fields under messages[].content[].cache_control are unsupported."];
|
|
1650
1341
|
}];
|
|
1651
1342
|
|
|
1652
|
-
export { AnthropicApi,
|
|
1343
|
+
export { AnthropicApi, OpenAIApi, allOperations, anthropicMessagesOp as anthropicMessages, balanceOp as balance, blobsOp as blobs, chatOp as chat, copyOp as copy, createOp as create, createBlobOp as createBlob, deleteOp as delete, embedOp as embed, generateOp as generate, openaiChatCompletionsOp as openaiChatCompletions, openaiCompletionsOp as openaiCompletions, openaiEmbeddingsOp as openaiEmbeddings, openaiModelsOp as openaiModels, openaiModelsGetOneOp as openaiModelsGetOne, openaiResponsesOp as openaiResponses, psOp as ps, pullOp as pull, pushOp as push, showOp as show, systemOneOp as systemOne, tagsOp as tags, usageOp as usage, versionOp as version, webFetchOp as webFetch, webSearchOp as webSearch };
|