@nemesis-oss/ollama-sdk 1.6.0 → 1.8.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 +14 -2
- package/README.md +31 -0
- package/dist/anthropic-B_UXplNF.d.ts +1647 -0
- package/dist/anthropic-CVDFy_a0.d.cts +1647 -0
- package/dist/generated-api.cjs +74 -6
- package/dist/generated-api.cjs.map +1 -1
- package/dist/generated-api.d.cts +230 -629
- package/dist/generated-api.d.ts +230 -629
- package/dist/generated-api.js +72 -7
- package/dist/generated-api.js.map +1 -1
- package/dist/generated-models-schemas.cjs +89 -1
- package/dist/generated-models-schemas.cjs.map +1 -1
- package/dist/generated-models-schemas.d.cts +121 -1
- package/dist/generated-models-schemas.d.ts +121 -1
- package/dist/generated-models-schemas.js +79 -2
- package/dist/generated-models-schemas.js.map +1 -1
- package/dist/generated-runtime.cjs +576 -57
- package/dist/generated-runtime.cjs.map +1 -1
- package/dist/generated-runtime.d.cts +21 -23
- package/dist/generated-runtime.d.ts +21 -23
- package/dist/generated-runtime.js +575 -58
- package/dist/generated-runtime.js.map +1 -1
- package/dist/index.cjs +1210 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +395 -876
- package/dist/index.d.ts +395 -876
- package/dist/index.js +1207 -82
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools.json +287 -73
- package/dist/mcp-generated.cjs +96 -7
- package/dist/mcp-generated.cjs.map +1 -1
- package/dist/mcp-generated.d.cts +3 -3
- package/dist/mcp-generated.d.ts +3 -3
- package/dist/mcp-generated.js +96 -7
- package/dist/mcp-generated.js.map +1 -1
- package/dist/mcp-http.cjs +43 -4
- package/dist/mcp-http.cjs.map +1 -1
- package/dist/mcp-http.d.cts +5 -1
- package/dist/mcp-http.d.ts +5 -1
- package/dist/mcp-http.js +43 -4
- package/dist/mcp-http.js.map +1 -1
- package/dist/mcp-stdio.cjs +43 -4
- package/dist/mcp-stdio.cjs.map +1 -1
- package/dist/mcp-stdio.d.cts +5 -1
- package/dist/mcp-stdio.d.ts +5 -1
- package/dist/mcp-stdio.js +43 -4
- package/dist/mcp-stdio.js.map +1 -1
- package/dist/{runtime-CVQkbYgF.d.ts → runtime-C6UYtBRB.d.ts} +222 -6
- package/dist/{runtime-IxRpUBjN.d.cts → runtime-DTmUeU6K.d.cts} +222 -6
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.js.map +1 -1
- package/dist/types-CI-gM2u5.d.cts +139 -0
- package/dist/types-CI-gM2u5.d.ts +139 -0
- package/package.json +4 -2
- package/dist/types-MOsWXEE7.d.cts +0 -66
- package/dist/types-MOsWXEE7.d.ts +0 -66
package/dist/generated-api.d.ts
CHANGED
|
@@ -1,610 +1,10 @@
|
|
|
1
|
-
import { O as
|
|
2
|
-
export {
|
|
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-B_UXplNF.js';
|
|
2
|
+
export { N as NativeApi } from './anthropic-B_UXplNF.js';
|
|
3
|
+
import { O as OllamaRuntime } from './runtime-C6UYtBRB.js';
|
|
4
|
+
export { a as OperationDefinition } from './runtime-C6UYtBRB.js';
|
|
3
5
|
import './types-5PAjLoCp.js';
|
|
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
|
/**
|
|
@@ -682,6 +82,14 @@ declare const blobsOp: {
|
|
|
682
82
|
readonly local: true;
|
|
683
83
|
readonly cloud: false;
|
|
684
84
|
};
|
|
85
|
+
readonly parameters: readonly [{
|
|
86
|
+
readonly name: "digest";
|
|
87
|
+
readonly in: "path";
|
|
88
|
+
readonly required: true;
|
|
89
|
+
readonly schema: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
};
|
|
92
|
+
}];
|
|
685
93
|
readonly transport: {
|
|
686
94
|
readonly mode: "json";
|
|
687
95
|
readonly streaming: false;
|
|
@@ -775,6 +183,33 @@ declare const createOp: {
|
|
|
775
183
|
readonly domain: "native";
|
|
776
184
|
readonly notes: readonly ["Model creation is local-only; Ollama Cloud does not support it."];
|
|
777
185
|
};
|
|
186
|
+
declare const createBlobOp: {
|
|
187
|
+
readonly operationId: "createBlob";
|
|
188
|
+
readonly method: "POST";
|
|
189
|
+
readonly path: "/api/blobs/{digest}";
|
|
190
|
+
readonly environment: {
|
|
191
|
+
readonly local: true;
|
|
192
|
+
readonly cloud: false;
|
|
193
|
+
};
|
|
194
|
+
readonly parameters: readonly [{
|
|
195
|
+
readonly name: "digest";
|
|
196
|
+
readonly in: "path";
|
|
197
|
+
readonly required: true;
|
|
198
|
+
readonly schema: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
};
|
|
201
|
+
}];
|
|
202
|
+
readonly transport: {
|
|
203
|
+
readonly mode: "json";
|
|
204
|
+
readonly streaming: false;
|
|
205
|
+
};
|
|
206
|
+
readonly capabilities: {};
|
|
207
|
+
readonly status: {
|
|
208
|
+
readonly documented: true;
|
|
209
|
+
};
|
|
210
|
+
readonly domain: "native";
|
|
211
|
+
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."];
|
|
212
|
+
};
|
|
778
213
|
declare const deleteOp: {
|
|
779
214
|
readonly operationId: "delete";
|
|
780
215
|
readonly method: "DELETE";
|
|
@@ -952,6 +387,12 @@ declare const systemOneOp: {
|
|
|
952
387
|
readonly operationId: "systemOne";
|
|
953
388
|
readonly method: "POST";
|
|
954
389
|
readonly path: "/v1/systemone";
|
|
390
|
+
readonly request: {
|
|
391
|
+
readonly $ref: "#/schemas/SystemOneRequest";
|
|
392
|
+
};
|
|
393
|
+
readonly response: {
|
|
394
|
+
readonly $ref: "#/schemas/SystemOneResponse";
|
|
395
|
+
};
|
|
955
396
|
readonly environment: {
|
|
956
397
|
readonly local: true;
|
|
957
398
|
readonly cloud: false;
|
|
@@ -963,7 +404,7 @@ declare const systemOneOp: {
|
|
|
963
404
|
readonly capabilities: {
|
|
964
405
|
readonly thinking: "unsupported";
|
|
965
406
|
readonly tools: "unsupported";
|
|
966
|
-
readonly vision: "
|
|
407
|
+
readonly vision: "model-dependent";
|
|
967
408
|
readonly structuredOutput: "unsupported";
|
|
968
409
|
readonly logprobs: "unsupported";
|
|
969
410
|
readonly embeddings: "unsupported";
|
|
@@ -971,13 +412,14 @@ declare const systemOneOp: {
|
|
|
971
412
|
readonly constraints: {
|
|
972
413
|
readonly minOllamaVersion: "0.35.0";
|
|
973
414
|
readonly maxRequestBytes: 65536;
|
|
415
|
+
readonly maxRequestBytesWithImages: 33554432;
|
|
974
416
|
};
|
|
975
417
|
readonly status: {
|
|
976
418
|
readonly documented: true;
|
|
977
419
|
readonly experimental: true;
|
|
978
420
|
};
|
|
979
421
|
readonly domain: "native";
|
|
980
|
-
readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "
|
|
422
|
+
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
423
|
};
|
|
982
424
|
declare const tagsOp: {
|
|
983
425
|
readonly operationId: "tags";
|
|
@@ -1021,6 +463,58 @@ declare const versionOp: {
|
|
|
1021
463
|
};
|
|
1022
464
|
readonly domain: "native";
|
|
1023
465
|
};
|
|
466
|
+
declare const webFetchOp: {
|
|
467
|
+
readonly operationId: "webFetch";
|
|
468
|
+
readonly method: "POST";
|
|
469
|
+
readonly path: "/api/web_fetch";
|
|
470
|
+
readonly request: {
|
|
471
|
+
readonly $ref: "#/schemas/WebFetchRequest";
|
|
472
|
+
};
|
|
473
|
+
readonly response: {
|
|
474
|
+
readonly $ref: "#/schemas/WebFetchResponse";
|
|
475
|
+
};
|
|
476
|
+
readonly environment: {
|
|
477
|
+
readonly local: false;
|
|
478
|
+
readonly cloud: true;
|
|
479
|
+
};
|
|
480
|
+
readonly host: "https://ollama.com";
|
|
481
|
+
readonly transport: {
|
|
482
|
+
readonly mode: "json";
|
|
483
|
+
readonly streaming: false;
|
|
484
|
+
};
|
|
485
|
+
readonly capabilities: {};
|
|
486
|
+
readonly status: {
|
|
487
|
+
readonly documented: true;
|
|
488
|
+
};
|
|
489
|
+
readonly domain: "native";
|
|
490
|
+
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."];
|
|
491
|
+
};
|
|
492
|
+
declare const webSearchOp: {
|
|
493
|
+
readonly operationId: "webSearch";
|
|
494
|
+
readonly method: "POST";
|
|
495
|
+
readonly path: "/api/web_search";
|
|
496
|
+
readonly request: {
|
|
497
|
+
readonly $ref: "#/schemas/WebSearchRequest";
|
|
498
|
+
};
|
|
499
|
+
readonly response: {
|
|
500
|
+
readonly $ref: "#/schemas/WebSearchResponse";
|
|
501
|
+
};
|
|
502
|
+
readonly environment: {
|
|
503
|
+
readonly local: false;
|
|
504
|
+
readonly cloud: true;
|
|
505
|
+
};
|
|
506
|
+
readonly host: "https://ollama.com";
|
|
507
|
+
readonly transport: {
|
|
508
|
+
readonly mode: "json";
|
|
509
|
+
readonly streaming: false;
|
|
510
|
+
};
|
|
511
|
+
readonly capabilities: {};
|
|
512
|
+
readonly status: {
|
|
513
|
+
readonly documented: true;
|
|
514
|
+
};
|
|
515
|
+
readonly domain: "native";
|
|
516
|
+
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."];
|
|
517
|
+
};
|
|
1024
518
|
declare const openaiChatCompletionsOp: {
|
|
1025
519
|
readonly operationId: "openaiChatCompletions";
|
|
1026
520
|
readonly method: "POST";
|
|
@@ -1114,6 +608,14 @@ declare const openaiModelsGetOneOp: {
|
|
|
1114
608
|
readonly local: true;
|
|
1115
609
|
readonly cloud: true;
|
|
1116
610
|
};
|
|
611
|
+
readonly parameters: readonly [{
|
|
612
|
+
readonly name: "model";
|
|
613
|
+
readonly in: "path";
|
|
614
|
+
readonly required: true;
|
|
615
|
+
readonly schema: {
|
|
616
|
+
readonly type: "string";
|
|
617
|
+
};
|
|
618
|
+
}];
|
|
1117
619
|
readonly transport: {
|
|
1118
620
|
readonly mode: "json";
|
|
1119
621
|
readonly streaming: false;
|
|
@@ -1179,6 +681,14 @@ declare const allOperations: readonly [{
|
|
|
1179
681
|
readonly local: true;
|
|
1180
682
|
readonly cloud: false;
|
|
1181
683
|
};
|
|
684
|
+
readonly parameters: readonly [{
|
|
685
|
+
readonly name: "digest";
|
|
686
|
+
readonly in: "path";
|
|
687
|
+
readonly required: true;
|
|
688
|
+
readonly schema: {
|
|
689
|
+
readonly type: "string";
|
|
690
|
+
};
|
|
691
|
+
}];
|
|
1182
692
|
readonly transport: {
|
|
1183
693
|
readonly mode: "json";
|
|
1184
694
|
readonly streaming: false;
|
|
@@ -1268,6 +778,32 @@ declare const allOperations: readonly [{
|
|
|
1268
778
|
};
|
|
1269
779
|
readonly domain: "native";
|
|
1270
780
|
readonly notes: readonly ["Model creation is local-only; Ollama Cloud does not support it."];
|
|
781
|
+
}, {
|
|
782
|
+
readonly operationId: "createBlob";
|
|
783
|
+
readonly method: "POST";
|
|
784
|
+
readonly path: "/api/blobs/{digest}";
|
|
785
|
+
readonly environment: {
|
|
786
|
+
readonly local: true;
|
|
787
|
+
readonly cloud: false;
|
|
788
|
+
};
|
|
789
|
+
readonly parameters: readonly [{
|
|
790
|
+
readonly name: "digest";
|
|
791
|
+
readonly in: "path";
|
|
792
|
+
readonly required: true;
|
|
793
|
+
readonly schema: {
|
|
794
|
+
readonly type: "string";
|
|
795
|
+
};
|
|
796
|
+
}];
|
|
797
|
+
readonly transport: {
|
|
798
|
+
readonly mode: "json";
|
|
799
|
+
readonly streaming: false;
|
|
800
|
+
};
|
|
801
|
+
readonly capabilities: {};
|
|
802
|
+
readonly status: {
|
|
803
|
+
readonly documented: true;
|
|
804
|
+
};
|
|
805
|
+
readonly domain: "native";
|
|
806
|
+
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
807
|
}, {
|
|
1272
808
|
readonly operationId: "delete";
|
|
1273
809
|
readonly method: "DELETE";
|
|
@@ -1438,6 +974,12 @@ declare const allOperations: readonly [{
|
|
|
1438
974
|
readonly operationId: "systemOne";
|
|
1439
975
|
readonly method: "POST";
|
|
1440
976
|
readonly path: "/v1/systemone";
|
|
977
|
+
readonly request: {
|
|
978
|
+
readonly $ref: "#/schemas/SystemOneRequest";
|
|
979
|
+
};
|
|
980
|
+
readonly response: {
|
|
981
|
+
readonly $ref: "#/schemas/SystemOneResponse";
|
|
982
|
+
};
|
|
1441
983
|
readonly environment: {
|
|
1442
984
|
readonly local: true;
|
|
1443
985
|
readonly cloud: false;
|
|
@@ -1449,7 +991,7 @@ declare const allOperations: readonly [{
|
|
|
1449
991
|
readonly capabilities: {
|
|
1450
992
|
readonly thinking: "unsupported";
|
|
1451
993
|
readonly tools: "unsupported";
|
|
1452
|
-
readonly vision: "
|
|
994
|
+
readonly vision: "model-dependent";
|
|
1453
995
|
readonly structuredOutput: "unsupported";
|
|
1454
996
|
readonly logprobs: "unsupported";
|
|
1455
997
|
readonly embeddings: "unsupported";
|
|
@@ -1457,13 +999,14 @@ declare const allOperations: readonly [{
|
|
|
1457
999
|
readonly constraints: {
|
|
1458
1000
|
readonly minOllamaVersion: "0.35.0";
|
|
1459
1001
|
readonly maxRequestBytes: 65536;
|
|
1002
|
+
readonly maxRequestBytesWithImages: 33554432;
|
|
1460
1003
|
};
|
|
1461
1004
|
readonly status: {
|
|
1462
1005
|
readonly documented: true;
|
|
1463
1006
|
readonly experimental: true;
|
|
1464
1007
|
};
|
|
1465
1008
|
readonly domain: "native";
|
|
1466
|
-
readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "
|
|
1009
|
+
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
1010
|
}, {
|
|
1468
1011
|
readonly operationId: "tags";
|
|
1469
1012
|
readonly method: "GET";
|
|
@@ -1504,6 +1047,56 @@ declare const allOperations: readonly [{
|
|
|
1504
1047
|
readonly documented: true;
|
|
1505
1048
|
};
|
|
1506
1049
|
readonly domain: "native";
|
|
1050
|
+
}, {
|
|
1051
|
+
readonly operationId: "webFetch";
|
|
1052
|
+
readonly method: "POST";
|
|
1053
|
+
readonly path: "/api/web_fetch";
|
|
1054
|
+
readonly request: {
|
|
1055
|
+
readonly $ref: "#/schemas/WebFetchRequest";
|
|
1056
|
+
};
|
|
1057
|
+
readonly response: {
|
|
1058
|
+
readonly $ref: "#/schemas/WebFetchResponse";
|
|
1059
|
+
};
|
|
1060
|
+
readonly environment: {
|
|
1061
|
+
readonly local: false;
|
|
1062
|
+
readonly cloud: true;
|
|
1063
|
+
};
|
|
1064
|
+
readonly host: "https://ollama.com";
|
|
1065
|
+
readonly transport: {
|
|
1066
|
+
readonly mode: "json";
|
|
1067
|
+
readonly streaming: false;
|
|
1068
|
+
};
|
|
1069
|
+
readonly capabilities: {};
|
|
1070
|
+
readonly status: {
|
|
1071
|
+
readonly documented: true;
|
|
1072
|
+
};
|
|
1073
|
+
readonly domain: "native";
|
|
1074
|
+
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."];
|
|
1075
|
+
}, {
|
|
1076
|
+
readonly operationId: "webSearch";
|
|
1077
|
+
readonly method: "POST";
|
|
1078
|
+
readonly path: "/api/web_search";
|
|
1079
|
+
readonly request: {
|
|
1080
|
+
readonly $ref: "#/schemas/WebSearchRequest";
|
|
1081
|
+
};
|
|
1082
|
+
readonly response: {
|
|
1083
|
+
readonly $ref: "#/schemas/WebSearchResponse";
|
|
1084
|
+
};
|
|
1085
|
+
readonly environment: {
|
|
1086
|
+
readonly local: false;
|
|
1087
|
+
readonly cloud: true;
|
|
1088
|
+
};
|
|
1089
|
+
readonly host: "https://ollama.com";
|
|
1090
|
+
readonly transport: {
|
|
1091
|
+
readonly mode: "json";
|
|
1092
|
+
readonly streaming: false;
|
|
1093
|
+
};
|
|
1094
|
+
readonly capabilities: {};
|
|
1095
|
+
readonly status: {
|
|
1096
|
+
readonly documented: true;
|
|
1097
|
+
};
|
|
1098
|
+
readonly domain: "native";
|
|
1099
|
+
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
1100
|
}, {
|
|
1508
1101
|
readonly operationId: "openaiChatCompletions";
|
|
1509
1102
|
readonly method: "POST";
|
|
@@ -1593,6 +1186,14 @@ declare const allOperations: readonly [{
|
|
|
1593
1186
|
readonly local: true;
|
|
1594
1187
|
readonly cloud: true;
|
|
1595
1188
|
};
|
|
1189
|
+
readonly parameters: readonly [{
|
|
1190
|
+
readonly name: "model";
|
|
1191
|
+
readonly in: "path";
|
|
1192
|
+
readonly required: true;
|
|
1193
|
+
readonly schema: {
|
|
1194
|
+
readonly type: "string";
|
|
1195
|
+
};
|
|
1196
|
+
}];
|
|
1596
1197
|
readonly transport: {
|
|
1597
1198
|
readonly mode: "json";
|
|
1598
1199
|
readonly streaming: false;
|
|
@@ -1649,4 +1250,4 @@ declare const allOperations: readonly [{
|
|
|
1649
1250
|
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
1251
|
}];
|
|
1651
1252
|
|
|
1652
|
-
export { AnthropicApi,
|
|
1253
|
+
export { AnthropicApi, OpenAIApi, allOperations, anthropicMessagesOp as anthropicMessages, 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, versionOp as version, webFetchOp as webFetch, webSearchOp as webSearch };
|