@easbot/ollama-sdk 0.3.27 → 0.3.29

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/dist/index.d.cts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { LanguageModelV3, LanguageModelV3CallOptions, LanguageModelV3GenerateResult, LanguageModelV3StreamResult, EmbeddingModelV3, EmbeddingModelV3CallOptions, EmbeddingModelV3Result, RerankingModelV3 } from '@ai-sdk/provider';
2
+ import z from 'zod';
3
+ import { NamedError } from '@easbot/utils';
2
4
 
3
5
  type OllamaModelId = string;
4
6
  interface OllamaConfig {
@@ -105,26 +107,718 @@ declare function createOllama(config?: OllamaConfig): OllamaProvider;
105
107
 
106
108
  declare const VERSION = "0.1.0";
107
109
 
108
- declare class OllamaError extends Error {
109
- readonly cause?: unknown | undefined;
110
- constructor(message: string, cause?: unknown | undefined);
111
- }
112
- declare class ConnectionError extends OllamaError {
113
- readonly url: string;
114
- constructor(message: string, url: string, cause?: unknown);
115
- }
116
- declare class ModelNotFoundError extends OllamaError {
117
- readonly modelId: string;
118
- constructor(modelId: string, cause?: unknown);
119
- }
120
- declare class ValidationError extends OllamaError {
121
- readonly field: string;
122
- readonly value: unknown;
123
- constructor(message: string, field: string, value: unknown, cause?: unknown);
124
- }
125
- declare class TimeoutError extends OllamaError {
126
- readonly timeoutMs: number;
127
- constructor(message: string, timeoutMs: number, cause?: unknown);
110
+ declare namespace OllamaErrors {
111
+ const NamedError: typeof NamedError;
112
+ const OllamaConnectionError: {
113
+ new (data: {
114
+ message: string;
115
+ url?: string | undefined;
116
+ code?: number | undefined;
117
+ }, options?: ErrorOptions): {
118
+ readonly name: "OllamaConnectionError";
119
+ readonly data: {
120
+ message: string;
121
+ url?: string | undefined;
122
+ code?: number | undefined;
123
+ };
124
+ schema(): z.ZodObject<{
125
+ name: z.ZodLiteral<"OllamaConnectionError">;
126
+ data: z.ZodObject<{
127
+ message: z.ZodString;
128
+ url: z.ZodOptional<z.ZodString>;
129
+ code: z.ZodOptional<z.ZodNumber>;
130
+ }, z.core.$strip>;
131
+ }, z.core.$strip>;
132
+ toObject(): {
133
+ name: "OllamaConnectionError";
134
+ data: {
135
+ message: string;
136
+ url?: string | undefined;
137
+ code?: number | undefined;
138
+ };
139
+ };
140
+ message: string;
141
+ stack?: string;
142
+ cause?: unknown;
143
+ };
144
+ readonly Schema: z.ZodObject<{
145
+ name: z.ZodLiteral<"OllamaConnectionError">;
146
+ data: z.ZodObject<{
147
+ message: z.ZodString;
148
+ url: z.ZodOptional<z.ZodString>;
149
+ code: z.ZodOptional<z.ZodNumber>;
150
+ }, z.core.$strip>;
151
+ }, z.core.$strip>;
152
+ isInstance(input: any): input is InstanceType<any>;
153
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
154
+ readonly Unknown: {
155
+ new (data: {
156
+ message: string;
157
+ }, options?: ErrorOptions): {
158
+ readonly name: "UnknownError";
159
+ readonly data: {
160
+ message: string;
161
+ };
162
+ schema(): z.ZodObject<{
163
+ name: z.ZodLiteral<"UnknownError">;
164
+ data: z.ZodObject<{
165
+ message: z.ZodString;
166
+ }, z.core.$strip>;
167
+ }, z.core.$strip>;
168
+ toObject(): {
169
+ name: "UnknownError";
170
+ data: {
171
+ message: string;
172
+ };
173
+ };
174
+ message: string;
175
+ stack?: string;
176
+ cause?: unknown;
177
+ };
178
+ readonly Schema: z.ZodObject<{
179
+ name: z.ZodLiteral<"UnknownError">;
180
+ data: z.ZodObject<{
181
+ message: z.ZodString;
182
+ }, z.core.$strip>;
183
+ }, z.core.$strip>;
184
+ isInstance(input: any): input is {
185
+ readonly name: "UnknownError";
186
+ readonly data: {
187
+ message: string;
188
+ };
189
+ schema(): z.ZodObject<{
190
+ name: z.ZodLiteral<"UnknownError">;
191
+ data: z.ZodObject<{
192
+ message: z.ZodString;
193
+ }, z.core.$strip>;
194
+ }, z.core.$strip>;
195
+ toObject(): {
196
+ name: "UnknownError";
197
+ data: {
198
+ message: string;
199
+ };
200
+ };
201
+ message: string;
202
+ stack?: string;
203
+ cause?: unknown;
204
+ };
205
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
206
+ readonly Unknown: any;
207
+ isError(error: unknown): error is Error;
208
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
209
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
210
+ stackTraceLimit: number;
211
+ };
212
+ isError(error: unknown): error is Error;
213
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
214
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
215
+ stackTraceLimit: number;
216
+ };
217
+ const BodyNullError: {
218
+ new (data: {
219
+ message: string;
220
+ }, options?: ErrorOptions): {
221
+ readonly name: "OllamaBodyNullError";
222
+ readonly data: {
223
+ message: string;
224
+ };
225
+ schema(): z.ZodObject<{
226
+ name: z.ZodLiteral<"OllamaBodyNullError">;
227
+ data: z.ZodObject<{
228
+ message: z.ZodString;
229
+ }, z.core.$strip>;
230
+ }, z.core.$strip>;
231
+ toObject(): {
232
+ name: "OllamaBodyNullError";
233
+ data: {
234
+ message: string;
235
+ };
236
+ };
237
+ message: string;
238
+ stack?: string;
239
+ cause?: unknown;
240
+ };
241
+ readonly Schema: z.ZodObject<{
242
+ name: z.ZodLiteral<"OllamaBodyNullError">;
243
+ data: z.ZodObject<{
244
+ message: z.ZodString;
245
+ }, z.core.$strip>;
246
+ }, z.core.$strip>;
247
+ isInstance(input: any): input is InstanceType<any>;
248
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
249
+ readonly Unknown: {
250
+ new (data: {
251
+ message: string;
252
+ }, options?: ErrorOptions): {
253
+ readonly name: "UnknownError";
254
+ readonly data: {
255
+ message: string;
256
+ };
257
+ schema(): z.ZodObject<{
258
+ name: z.ZodLiteral<"UnknownError">;
259
+ data: z.ZodObject<{
260
+ message: z.ZodString;
261
+ }, z.core.$strip>;
262
+ }, z.core.$strip>;
263
+ toObject(): {
264
+ name: "UnknownError";
265
+ data: {
266
+ message: string;
267
+ };
268
+ };
269
+ message: string;
270
+ stack?: string;
271
+ cause?: unknown;
272
+ };
273
+ readonly Schema: z.ZodObject<{
274
+ name: z.ZodLiteral<"UnknownError">;
275
+ data: z.ZodObject<{
276
+ message: z.ZodString;
277
+ }, z.core.$strip>;
278
+ }, z.core.$strip>;
279
+ isInstance(input: any): input is {
280
+ readonly name: "UnknownError";
281
+ readonly data: {
282
+ message: string;
283
+ };
284
+ schema(): z.ZodObject<{
285
+ name: z.ZodLiteral<"UnknownError">;
286
+ data: z.ZodObject<{
287
+ message: z.ZodString;
288
+ }, z.core.$strip>;
289
+ }, z.core.$strip>;
290
+ toObject(): {
291
+ name: "UnknownError";
292
+ data: {
293
+ message: string;
294
+ };
295
+ };
296
+ message: string;
297
+ stack?: string;
298
+ cause?: unknown;
299
+ };
300
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
301
+ readonly Unknown: any;
302
+ isError(error: unknown): error is Error;
303
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
304
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
305
+ stackTraceLimit: number;
306
+ };
307
+ isError(error: unknown): error is Error;
308
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
309
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
310
+ stackTraceLimit: number;
311
+ };
312
+ const ModelNotFoundError: {
313
+ new (data: {
314
+ message: string;
315
+ modelId?: string | undefined;
316
+ }, options?: ErrorOptions): {
317
+ readonly name: "OllamaModelNotFoundError";
318
+ readonly data: {
319
+ message: string;
320
+ modelId?: string | undefined;
321
+ };
322
+ schema(): z.ZodObject<{
323
+ name: z.ZodLiteral<"OllamaModelNotFoundError">;
324
+ data: z.ZodObject<{
325
+ message: z.ZodString;
326
+ modelId: z.ZodOptional<z.ZodString>;
327
+ }, z.core.$strip>;
328
+ }, z.core.$strip>;
329
+ toObject(): {
330
+ name: "OllamaModelNotFoundError";
331
+ data: {
332
+ message: string;
333
+ modelId?: string | undefined;
334
+ };
335
+ };
336
+ message: string;
337
+ stack?: string;
338
+ cause?: unknown;
339
+ };
340
+ readonly Schema: z.ZodObject<{
341
+ name: z.ZodLiteral<"OllamaModelNotFoundError">;
342
+ data: z.ZodObject<{
343
+ message: z.ZodString;
344
+ modelId: z.ZodOptional<z.ZodString>;
345
+ }, z.core.$strip>;
346
+ }, z.core.$strip>;
347
+ isInstance(input: any): input is InstanceType<any>;
348
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
349
+ readonly Unknown: {
350
+ new (data: {
351
+ message: string;
352
+ }, options?: ErrorOptions): {
353
+ readonly name: "UnknownError";
354
+ readonly data: {
355
+ message: string;
356
+ };
357
+ schema(): z.ZodObject<{
358
+ name: z.ZodLiteral<"UnknownError">;
359
+ data: z.ZodObject<{
360
+ message: z.ZodString;
361
+ }, z.core.$strip>;
362
+ }, z.core.$strip>;
363
+ toObject(): {
364
+ name: "UnknownError";
365
+ data: {
366
+ message: string;
367
+ };
368
+ };
369
+ message: string;
370
+ stack?: string;
371
+ cause?: unknown;
372
+ };
373
+ readonly Schema: z.ZodObject<{
374
+ name: z.ZodLiteral<"UnknownError">;
375
+ data: z.ZodObject<{
376
+ message: z.ZodString;
377
+ }, z.core.$strip>;
378
+ }, z.core.$strip>;
379
+ isInstance(input: any): input is {
380
+ readonly name: "UnknownError";
381
+ readonly data: {
382
+ message: string;
383
+ };
384
+ schema(): z.ZodObject<{
385
+ name: z.ZodLiteral<"UnknownError">;
386
+ data: z.ZodObject<{
387
+ message: z.ZodString;
388
+ }, z.core.$strip>;
389
+ }, z.core.$strip>;
390
+ toObject(): {
391
+ name: "UnknownError";
392
+ data: {
393
+ message: string;
394
+ };
395
+ };
396
+ message: string;
397
+ stack?: string;
398
+ cause?: unknown;
399
+ };
400
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
401
+ readonly Unknown: any;
402
+ isError(error: unknown): error is Error;
403
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
404
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
405
+ stackTraceLimit: number;
406
+ };
407
+ isError(error: unknown): error is Error;
408
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
409
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
410
+ stackTraceLimit: number;
411
+ };
412
+ const ValidationError: {
413
+ new (data: {
414
+ message: string;
415
+ field?: string | undefined;
416
+ value?: unknown;
417
+ }, options?: ErrorOptions): {
418
+ readonly name: "OllamaValidationError";
419
+ readonly data: {
420
+ message: string;
421
+ field?: string | undefined;
422
+ value?: unknown;
423
+ };
424
+ schema(): z.ZodObject<{
425
+ name: z.ZodLiteral<"OllamaValidationError">;
426
+ data: z.ZodObject<{
427
+ message: z.ZodString;
428
+ field: z.ZodOptional<z.ZodString>;
429
+ value: z.ZodOptional<z.ZodUnknown>;
430
+ }, z.core.$strip>;
431
+ }, z.core.$strip>;
432
+ toObject(): {
433
+ name: "OllamaValidationError";
434
+ data: {
435
+ message: string;
436
+ field?: string | undefined;
437
+ value?: unknown;
438
+ };
439
+ };
440
+ message: string;
441
+ stack?: string;
442
+ cause?: unknown;
443
+ };
444
+ readonly Schema: z.ZodObject<{
445
+ name: z.ZodLiteral<"OllamaValidationError">;
446
+ data: z.ZodObject<{
447
+ message: z.ZodString;
448
+ field: z.ZodOptional<z.ZodString>;
449
+ value: z.ZodOptional<z.ZodUnknown>;
450
+ }, z.core.$strip>;
451
+ }, z.core.$strip>;
452
+ isInstance(input: any): input is InstanceType<any>;
453
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
454
+ readonly Unknown: {
455
+ new (data: {
456
+ message: string;
457
+ }, options?: ErrorOptions): {
458
+ readonly name: "UnknownError";
459
+ readonly data: {
460
+ message: string;
461
+ };
462
+ schema(): z.ZodObject<{
463
+ name: z.ZodLiteral<"UnknownError">;
464
+ data: z.ZodObject<{
465
+ message: z.ZodString;
466
+ }, z.core.$strip>;
467
+ }, z.core.$strip>;
468
+ toObject(): {
469
+ name: "UnknownError";
470
+ data: {
471
+ message: string;
472
+ };
473
+ };
474
+ message: string;
475
+ stack?: string;
476
+ cause?: unknown;
477
+ };
478
+ readonly Schema: z.ZodObject<{
479
+ name: z.ZodLiteral<"UnknownError">;
480
+ data: z.ZodObject<{
481
+ message: z.ZodString;
482
+ }, z.core.$strip>;
483
+ }, z.core.$strip>;
484
+ isInstance(input: any): input is {
485
+ readonly name: "UnknownError";
486
+ readonly data: {
487
+ message: string;
488
+ };
489
+ schema(): z.ZodObject<{
490
+ name: z.ZodLiteral<"UnknownError">;
491
+ data: z.ZodObject<{
492
+ message: z.ZodString;
493
+ }, z.core.$strip>;
494
+ }, z.core.$strip>;
495
+ toObject(): {
496
+ name: "UnknownError";
497
+ data: {
498
+ message: string;
499
+ };
500
+ };
501
+ message: string;
502
+ stack?: string;
503
+ cause?: unknown;
504
+ };
505
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
506
+ readonly Unknown: any;
507
+ isError(error: unknown): error is Error;
508
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
509
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
510
+ stackTraceLimit: number;
511
+ };
512
+ isError(error: unknown): error is Error;
513
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
514
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
515
+ stackTraceLimit: number;
516
+ };
517
+ const InvalidToolDefinitionError: {
518
+ new (data: {
519
+ message: string;
520
+ toolName?: string | undefined;
521
+ missingField?: string | undefined;
522
+ }, options?: ErrorOptions): {
523
+ readonly name: "OllamaInvalidToolDefinitionError";
524
+ readonly data: {
525
+ message: string;
526
+ toolName?: string | undefined;
527
+ missingField?: string | undefined;
528
+ };
529
+ schema(): z.ZodObject<{
530
+ name: z.ZodLiteral<"OllamaInvalidToolDefinitionError">;
531
+ data: z.ZodObject<{
532
+ message: z.ZodString;
533
+ toolName: z.ZodOptional<z.ZodString>;
534
+ missingField: z.ZodOptional<z.ZodString>;
535
+ }, z.core.$strip>;
536
+ }, z.core.$strip>;
537
+ toObject(): {
538
+ name: "OllamaInvalidToolDefinitionError";
539
+ data: {
540
+ message: string;
541
+ toolName?: string | undefined;
542
+ missingField?: string | undefined;
543
+ };
544
+ };
545
+ message: string;
546
+ stack?: string;
547
+ cause?: unknown;
548
+ };
549
+ readonly Schema: z.ZodObject<{
550
+ name: z.ZodLiteral<"OllamaInvalidToolDefinitionError">;
551
+ data: z.ZodObject<{
552
+ message: z.ZodString;
553
+ toolName: z.ZodOptional<z.ZodString>;
554
+ missingField: z.ZodOptional<z.ZodString>;
555
+ }, z.core.$strip>;
556
+ }, z.core.$strip>;
557
+ isInstance(input: any): input is InstanceType<any>;
558
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
559
+ readonly Unknown: {
560
+ new (data: {
561
+ message: string;
562
+ }, options?: ErrorOptions): {
563
+ readonly name: "UnknownError";
564
+ readonly data: {
565
+ message: string;
566
+ };
567
+ schema(): z.ZodObject<{
568
+ name: z.ZodLiteral<"UnknownError">;
569
+ data: z.ZodObject<{
570
+ message: z.ZodString;
571
+ }, z.core.$strip>;
572
+ }, z.core.$strip>;
573
+ toObject(): {
574
+ name: "UnknownError";
575
+ data: {
576
+ message: string;
577
+ };
578
+ };
579
+ message: string;
580
+ stack?: string;
581
+ cause?: unknown;
582
+ };
583
+ readonly Schema: z.ZodObject<{
584
+ name: z.ZodLiteral<"UnknownError">;
585
+ data: z.ZodObject<{
586
+ message: z.ZodString;
587
+ }, z.core.$strip>;
588
+ }, z.core.$strip>;
589
+ isInstance(input: any): input is {
590
+ readonly name: "UnknownError";
591
+ readonly data: {
592
+ message: string;
593
+ };
594
+ schema(): z.ZodObject<{
595
+ name: z.ZodLiteral<"UnknownError">;
596
+ data: z.ZodObject<{
597
+ message: z.ZodString;
598
+ }, z.core.$strip>;
599
+ }, z.core.$strip>;
600
+ toObject(): {
601
+ name: "UnknownError";
602
+ data: {
603
+ message: string;
604
+ };
605
+ };
606
+ message: string;
607
+ stack?: string;
608
+ cause?: unknown;
609
+ };
610
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
611
+ readonly Unknown: any;
612
+ isError(error: unknown): error is Error;
613
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
614
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
615
+ stackTraceLimit: number;
616
+ };
617
+ isError(error: unknown): error is Error;
618
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
619
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
620
+ stackTraceLimit: number;
621
+ };
622
+ const InvalidResponseError: {
623
+ new (data: {
624
+ message: string;
625
+ endpoint?: string | undefined;
626
+ }, options?: ErrorOptions): {
627
+ readonly name: "OllamaInvalidResponseError";
628
+ readonly data: {
629
+ message: string;
630
+ endpoint?: string | undefined;
631
+ };
632
+ schema(): z.ZodObject<{
633
+ name: z.ZodLiteral<"OllamaInvalidResponseError">;
634
+ data: z.ZodObject<{
635
+ message: z.ZodString;
636
+ endpoint: z.ZodOptional<z.ZodString>;
637
+ }, z.core.$strip>;
638
+ }, z.core.$strip>;
639
+ toObject(): {
640
+ name: "OllamaInvalidResponseError";
641
+ data: {
642
+ message: string;
643
+ endpoint?: string | undefined;
644
+ };
645
+ };
646
+ message: string;
647
+ stack?: string;
648
+ cause?: unknown;
649
+ };
650
+ readonly Schema: z.ZodObject<{
651
+ name: z.ZodLiteral<"OllamaInvalidResponseError">;
652
+ data: z.ZodObject<{
653
+ message: z.ZodString;
654
+ endpoint: z.ZodOptional<z.ZodString>;
655
+ }, z.core.$strip>;
656
+ }, z.core.$strip>;
657
+ isInstance(input: any): input is InstanceType<any>;
658
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
659
+ readonly Unknown: {
660
+ new (data: {
661
+ message: string;
662
+ }, options?: ErrorOptions): {
663
+ readonly name: "UnknownError";
664
+ readonly data: {
665
+ message: string;
666
+ };
667
+ schema(): z.ZodObject<{
668
+ name: z.ZodLiteral<"UnknownError">;
669
+ data: z.ZodObject<{
670
+ message: z.ZodString;
671
+ }, z.core.$strip>;
672
+ }, z.core.$strip>;
673
+ toObject(): {
674
+ name: "UnknownError";
675
+ data: {
676
+ message: string;
677
+ };
678
+ };
679
+ message: string;
680
+ stack?: string;
681
+ cause?: unknown;
682
+ };
683
+ readonly Schema: z.ZodObject<{
684
+ name: z.ZodLiteral<"UnknownError">;
685
+ data: z.ZodObject<{
686
+ message: z.ZodString;
687
+ }, z.core.$strip>;
688
+ }, z.core.$strip>;
689
+ isInstance(input: any): input is {
690
+ readonly name: "UnknownError";
691
+ readonly data: {
692
+ message: string;
693
+ };
694
+ schema(): z.ZodObject<{
695
+ name: z.ZodLiteral<"UnknownError">;
696
+ data: z.ZodObject<{
697
+ message: z.ZodString;
698
+ }, z.core.$strip>;
699
+ }, z.core.$strip>;
700
+ toObject(): {
701
+ name: "UnknownError";
702
+ data: {
703
+ message: string;
704
+ };
705
+ };
706
+ message: string;
707
+ stack?: string;
708
+ cause?: unknown;
709
+ };
710
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
711
+ readonly Unknown: any;
712
+ isError(error: unknown): error is Error;
713
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
714
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
715
+ stackTraceLimit: number;
716
+ };
717
+ isError(error: unknown): error is Error;
718
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
719
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
720
+ stackTraceLimit: number;
721
+ };
722
+ const TimeoutError: {
723
+ new (data: {
724
+ message: string;
725
+ timeoutMs?: number | undefined;
726
+ }, options?: ErrorOptions): {
727
+ readonly name: "OllamaTimeoutError";
728
+ readonly data: {
729
+ message: string;
730
+ timeoutMs?: number | undefined;
731
+ };
732
+ schema(): z.ZodObject<{
733
+ name: z.ZodLiteral<"OllamaTimeoutError">;
734
+ data: z.ZodObject<{
735
+ message: z.ZodString;
736
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
737
+ }, z.core.$strip>;
738
+ }, z.core.$strip>;
739
+ toObject(): {
740
+ name: "OllamaTimeoutError";
741
+ data: {
742
+ message: string;
743
+ timeoutMs?: number | undefined;
744
+ };
745
+ };
746
+ message: string;
747
+ stack?: string;
748
+ cause?: unknown;
749
+ };
750
+ readonly Schema: z.ZodObject<{
751
+ name: z.ZodLiteral<"OllamaTimeoutError">;
752
+ data: z.ZodObject<{
753
+ message: z.ZodString;
754
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
755
+ }, z.core.$strip>;
756
+ }, z.core.$strip>;
757
+ isInstance(input: any): input is InstanceType<any>;
758
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
759
+ readonly Unknown: {
760
+ new (data: {
761
+ message: string;
762
+ }, options?: ErrorOptions): {
763
+ readonly name: "UnknownError";
764
+ readonly data: {
765
+ message: string;
766
+ };
767
+ schema(): z.ZodObject<{
768
+ name: z.ZodLiteral<"UnknownError">;
769
+ data: z.ZodObject<{
770
+ message: z.ZodString;
771
+ }, z.core.$strip>;
772
+ }, z.core.$strip>;
773
+ toObject(): {
774
+ name: "UnknownError";
775
+ data: {
776
+ message: string;
777
+ };
778
+ };
779
+ message: string;
780
+ stack?: string;
781
+ cause?: unknown;
782
+ };
783
+ readonly Schema: z.ZodObject<{
784
+ name: z.ZodLiteral<"UnknownError">;
785
+ data: z.ZodObject<{
786
+ message: z.ZodString;
787
+ }, z.core.$strip>;
788
+ }, z.core.$strip>;
789
+ isInstance(input: any): input is {
790
+ readonly name: "UnknownError";
791
+ readonly data: {
792
+ message: string;
793
+ };
794
+ schema(): z.ZodObject<{
795
+ name: z.ZodLiteral<"UnknownError">;
796
+ data: z.ZodObject<{
797
+ message: z.ZodString;
798
+ }, z.core.$strip>;
799
+ }, z.core.$strip>;
800
+ toObject(): {
801
+ name: "UnknownError";
802
+ data: {
803
+ message: string;
804
+ };
805
+ };
806
+ message: string;
807
+ stack?: string;
808
+ cause?: unknown;
809
+ };
810
+ create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
811
+ readonly Unknown: any;
812
+ isError(error: unknown): error is Error;
813
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
814
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
815
+ stackTraceLimit: number;
816
+ };
817
+ isError(error: unknown): error is Error;
818
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
819
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
820
+ stackTraceLimit: number;
821
+ };
128
822
  }
129
823
 
130
824
  declare const OLLAMA_DEFAULT_OPTIONS: {
@@ -137,4 +831,4 @@ declare const OLLAMA_DEFAULT_OPTIONS: {
137
831
  };
138
832
  declare const OLLAMA_SPECIFIC_PARAMS: readonly ["numCtx", "repeatPenalty", "numPredict"];
139
833
 
140
- export { ConnectionError, ModelNotFoundError, OLLAMA_DEFAULT_OPTIONS, OLLAMA_SPECIFIC_PARAMS, type OllamaConfig, OllamaEmbeddingModel, OllamaError, OllamaLanguageModel, type OllamaModelId, type OllamaProvider, type OllamaProviderOptions, TimeoutError, VERSION, ValidationError, createOllama };
834
+ export { OLLAMA_DEFAULT_OPTIONS, OLLAMA_SPECIFIC_PARAMS, type OllamaConfig, OllamaEmbeddingModel, OllamaErrors, OllamaLanguageModel, type OllamaModelId, type OllamaProvider, type OllamaProviderOptions, VERSION, createOllama };