ommlds 0.0.0.dev484__py3-none-any.whl → 0.0.0.dev486__py3-none-any.whl
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.
- ommlds/.omlish-manifests.json +1 -1
- ommlds/__about__.py +5 -2
- ommlds/backends/anthropic/protocol/_dataclasses.py +529 -529
- ommlds/backends/google/protocol/_dataclasses.py +1876 -1876
- ommlds/backends/groq/_dataclasses.py +1457 -1457
- ommlds/backends/ollama/_dataclasses.py +1116 -1116
- ommlds/backends/openai/protocol/_dataclasses.py +2254 -2254
- ommlds/backends/tavily/_dataclasses.py +753 -753
- ommlds/cli/_dataclasses.py +697 -697
- ommlds/minichain/_dataclasses.py +3630 -3630
- ommlds/nanochat/tokenizers.py +40 -6
- ommlds/tools/git.py +8 -2
- {ommlds-0.0.0.dev484.dist-info → ommlds-0.0.0.dev486.dist-info}/METADATA +5 -3
- {ommlds-0.0.0.dev484.dist-info → ommlds-0.0.0.dev486.dist-info}/RECORD +18 -18
- {ommlds-0.0.0.dev484.dist-info → ommlds-0.0.0.dev486.dist-info}/WHEEL +0 -0
- {ommlds-0.0.0.dev484.dist-info → ommlds-0.0.0.dev486.dist-info}/entry_points.txt +0 -0
- {ommlds-0.0.0.dev484.dist-info → ommlds-0.0.0.dev486.dist-info}/licenses/LICENSE +0 -0
- {ommlds-0.0.0.dev484.dist-info → ommlds-0.0.0.dev486.dist-info}/top_level.txt +0 -0
|
@@ -25,32 +25,56 @@ def _register(**kwargs):
|
|
|
25
25
|
|
|
26
26
|
@_register(
|
|
27
27
|
plan_repr=(
|
|
28
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
28
|
+
"Plans(tup=(CopyPlan(fields=('model', 'stream', 'options', 'format', 'keep_alive')), EqPlan(fields=('model', 's"
|
|
29
|
+
"tream', 'options', 'format', 'keep_alive')), FrozenPlan(fields=('model', 'stream', 'options', 'format', 'keep_"
|
|
30
|
+
"alive'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('model', 'stream', 'options', 'form"
|
|
31
|
+
"at', 'keep_alive'), cache=False), InitPlan(fields=(InitPlan.Field(name='model', annotation=OpRef(name='init.fi"
|
|
32
|
+
"elds.0.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTA"
|
|
33
|
+
"NCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='stream', annotation=OpRef(name='init.f"
|
|
34
|
+
"ields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=F"
|
|
35
|
+
"alse, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='option"
|
|
36
|
+
"s', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_fa"
|
|
37
|
+
"ctory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=N"
|
|
38
|
+
"one), InitPlan.Field(name='format', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='ini"
|
|
39
|
+
"t.fields.3.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=N"
|
|
40
|
+
"one, validate=None, check_type=None), InitPlan.Field(name='keep_alive', annotation=OpRef(name='init.fields.4.a"
|
|
41
|
+
"nnotation'), default=OpRef(name='init.fields.4.default'), default_factory=None, init=True, override=False, fie"
|
|
42
|
+
"ld_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), k"
|
|
43
|
+
"w_only_params=('model', 'stream', 'options', 'format', 'keep_alive'), frozen=True, slots=False, post_init_para"
|
|
44
|
+
"ms=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model', kw_only=True, fn=None), "
|
|
45
|
+
"ReprPlan.Field(name='stream', kw_only=True, fn=None), ReprPlan.Field(name='options', kw_only=True, fn=None), R"
|
|
46
|
+
"eprPlan.Field(name='format', kw_only=True, fn=None), ReprPlan.Field(name='keep_alive', kw_only=True, fn=None))"
|
|
47
|
+
", id=False, terse=False, default_fn=None)))"
|
|
38
48
|
),
|
|
39
|
-
plan_repr_sha1='
|
|
49
|
+
plan_repr_sha1='845e863b03ee92ab7c5b27be3dfabfb54b948c5d',
|
|
40
50
|
op_ref_idents=(
|
|
41
51
|
'__dataclass__init__fields__0__annotation',
|
|
42
52
|
'__dataclass__init__fields__1__annotation',
|
|
53
|
+
'__dataclass__init__fields__1__default',
|
|
54
|
+
'__dataclass__init__fields__2__annotation',
|
|
55
|
+
'__dataclass__init__fields__2__default',
|
|
56
|
+
'__dataclass__init__fields__3__annotation',
|
|
57
|
+
'__dataclass__init__fields__3__default',
|
|
58
|
+
'__dataclass__init__fields__4__annotation',
|
|
59
|
+
'__dataclass__init__fields__4__default',
|
|
43
60
|
),
|
|
44
61
|
cls_names=(
|
|
45
|
-
('ommlds.backends.ollama.protocol', '
|
|
62
|
+
('ommlds.backends.ollama.protocol', 'BaseGenerateRequest'),
|
|
46
63
|
),
|
|
47
64
|
)
|
|
48
|
-
def
|
|
65
|
+
def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
49
66
|
def _process_dataclass(
|
|
50
67
|
*,
|
|
51
68
|
__dataclass__cls,
|
|
52
69
|
__dataclass__init__fields__0__annotation,
|
|
53
70
|
__dataclass__init__fields__1__annotation,
|
|
71
|
+
__dataclass__init__fields__1__default,
|
|
72
|
+
__dataclass__init__fields__2__annotation,
|
|
73
|
+
__dataclass__init__fields__2__default,
|
|
74
|
+
__dataclass__init__fields__3__annotation,
|
|
75
|
+
__dataclass__init__fields__3__default,
|
|
76
|
+
__dataclass__init__fields__4__annotation,
|
|
77
|
+
__dataclass__init__fields__4__default,
|
|
54
78
|
__dataclass__FieldFnValidationError, # noqa
|
|
55
79
|
__dataclass__FieldTypeValidationError, # noqa
|
|
56
80
|
__dataclass__FnValidationError, # noqa
|
|
@@ -69,8 +93,11 @@ def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
|
69
93
|
if self.__class__ is not __dataclass__cls:
|
|
70
94
|
raise TypeError(self)
|
|
71
95
|
return __dataclass__cls( # noqa
|
|
72
|
-
|
|
73
|
-
|
|
96
|
+
model=self.model,
|
|
97
|
+
stream=self.stream,
|
|
98
|
+
options=self.options,
|
|
99
|
+
format=self.format,
|
|
100
|
+
keep_alive=self.keep_alive,
|
|
74
101
|
)
|
|
75
102
|
|
|
76
103
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -84,8 +111,11 @@ def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
|
84
111
|
if self.__class__ is not other.__class__:
|
|
85
112
|
return NotImplemented
|
|
86
113
|
return (
|
|
87
|
-
self.
|
|
88
|
-
self.
|
|
114
|
+
self.model == other.model and
|
|
115
|
+
self.stream == other.stream and
|
|
116
|
+
self.options == other.options and
|
|
117
|
+
self.format == other.format and
|
|
118
|
+
self.keep_alive == other.keep_alive
|
|
89
119
|
)
|
|
90
120
|
|
|
91
121
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -94,8 +124,11 @@ def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
|
94
124
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
95
125
|
|
|
96
126
|
__dataclass___setattr_frozen_fields = {
|
|
97
|
-
'
|
|
98
|
-
'
|
|
127
|
+
'model',
|
|
128
|
+
'stream',
|
|
129
|
+
'options',
|
|
130
|
+
'format',
|
|
131
|
+
'keep_alive',
|
|
99
132
|
}
|
|
100
133
|
|
|
101
134
|
def __setattr__(self, name, value):
|
|
@@ -112,8 +145,11 @@ def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
|
112
145
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
113
146
|
|
|
114
147
|
__dataclass___delattr_frozen_fields = {
|
|
115
|
-
'
|
|
116
|
-
'
|
|
148
|
+
'model',
|
|
149
|
+
'stream',
|
|
150
|
+
'options',
|
|
151
|
+
'format',
|
|
152
|
+
'keep_alive',
|
|
117
153
|
}
|
|
118
154
|
|
|
119
155
|
def __delattr__(self, name):
|
|
@@ -131,8 +167,11 @@ def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
|
131
167
|
|
|
132
168
|
def __hash__(self):
|
|
133
169
|
return hash((
|
|
134
|
-
self.
|
|
135
|
-
self.
|
|
170
|
+
self.model,
|
|
171
|
+
self.stream,
|
|
172
|
+
self.options,
|
|
173
|
+
self.format,
|
|
174
|
+
self.keep_alive,
|
|
136
175
|
))
|
|
137
176
|
|
|
138
177
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -141,11 +180,17 @@ def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
|
141
180
|
def __init__(
|
|
142
181
|
self,
|
|
143
182
|
*,
|
|
144
|
-
|
|
145
|
-
|
|
183
|
+
model: __dataclass__init__fields__0__annotation,
|
|
184
|
+
stream: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
185
|
+
options: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
186
|
+
format: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
187
|
+
keep_alive: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
146
188
|
) -> __dataclass__None:
|
|
147
|
-
__dataclass__object_setattr(self, '
|
|
148
|
-
__dataclass__object_setattr(self, '
|
|
189
|
+
__dataclass__object_setattr(self, 'model', model)
|
|
190
|
+
__dataclass__object_setattr(self, 'stream', stream)
|
|
191
|
+
__dataclass__object_setattr(self, 'options', options)
|
|
192
|
+
__dataclass__object_setattr(self, 'format', format)
|
|
193
|
+
__dataclass__object_setattr(self, 'keep_alive', keep_alive)
|
|
149
194
|
|
|
150
195
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
151
196
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -155,8 +200,11 @@ def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
|
155
200
|
@__dataclass___recursive_repr()
|
|
156
201
|
def __repr__(self):
|
|
157
202
|
parts = []
|
|
158
|
-
parts.append(f"
|
|
159
|
-
parts.append(f"
|
|
203
|
+
parts.append(f"model={self.model!r}")
|
|
204
|
+
parts.append(f"stream={self.stream!r}")
|
|
205
|
+
parts.append(f"options={self.options!r}")
|
|
206
|
+
parts.append(f"format={self.format!r}")
|
|
207
|
+
parts.append(f"keep_alive={self.keep_alive!r}")
|
|
160
208
|
return (
|
|
161
209
|
f"{self.__class__.__qualname__}("
|
|
162
210
|
f"{', '.join(parts)}"
|
|
@@ -451,23 +499,23 @@ def _process_dataclass__205d41e5f20db210da1989c24f7b9e3bf1ebccd3():
|
|
|
451
499
|
|
|
452
500
|
@_register(
|
|
453
501
|
plan_repr=(
|
|
454
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
"
|
|
460
|
-
"
|
|
502
|
+
"Plans(tup=(CopyPlan(fields=('model',)), EqPlan(fields=('model',)), FrozenPlan(fields=('model',), allow_dynamic"
|
|
503
|
+
"_dunder_attrs=False), HashPlan(action='add', fields=('model',), cache=False), InitPlan(fields=(InitPlan.Field("
|
|
504
|
+
"name='model', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True"
|
|
505
|
+
", override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='s"
|
|
506
|
+
"elf', std_params=(), kw_only_params=('model',), frozen=True, slots=False, post_init_params=None, init_fns=(), "
|
|
507
|
+
"validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model', kw_only=True, fn=None),), id=False, terse=Fals"
|
|
508
|
+
"e, default_fn=None)))"
|
|
461
509
|
),
|
|
462
|
-
plan_repr_sha1='
|
|
510
|
+
plan_repr_sha1='3310a48624d055c5c24df97f58e5c8f296523505',
|
|
463
511
|
op_ref_idents=(
|
|
464
512
|
'__dataclass__init__fields__0__annotation',
|
|
465
513
|
),
|
|
466
514
|
cls_names=(
|
|
467
|
-
('ommlds.backends.ollama.protocol', '
|
|
515
|
+
('ommlds.backends.ollama.protocol', 'BaseRequest'),
|
|
468
516
|
),
|
|
469
517
|
)
|
|
470
|
-
def
|
|
518
|
+
def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
471
519
|
def _process_dataclass(
|
|
472
520
|
*,
|
|
473
521
|
__dataclass__cls,
|
|
@@ -490,7 +538,7 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
490
538
|
if self.__class__ is not __dataclass__cls:
|
|
491
539
|
raise TypeError(self)
|
|
492
540
|
return __dataclass__cls( # noqa
|
|
493
|
-
|
|
541
|
+
model=self.model,
|
|
494
542
|
)
|
|
495
543
|
|
|
496
544
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -504,7 +552,7 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
504
552
|
if self.__class__ is not other.__class__:
|
|
505
553
|
return NotImplemented
|
|
506
554
|
return (
|
|
507
|
-
self.
|
|
555
|
+
self.model == other.model
|
|
508
556
|
)
|
|
509
557
|
|
|
510
558
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -513,7 +561,7 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
513
561
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
514
562
|
|
|
515
563
|
__dataclass___setattr_frozen_fields = {
|
|
516
|
-
'
|
|
564
|
+
'model',
|
|
517
565
|
}
|
|
518
566
|
|
|
519
567
|
def __setattr__(self, name, value):
|
|
@@ -530,7 +578,7 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
530
578
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
531
579
|
|
|
532
580
|
__dataclass___delattr_frozen_fields = {
|
|
533
|
-
'
|
|
581
|
+
'model',
|
|
534
582
|
}
|
|
535
583
|
|
|
536
584
|
def __delattr__(self, name):
|
|
@@ -548,7 +596,7 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
548
596
|
|
|
549
597
|
def __hash__(self):
|
|
550
598
|
return hash((
|
|
551
|
-
self.
|
|
599
|
+
self.model,
|
|
552
600
|
))
|
|
553
601
|
|
|
554
602
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -557,9 +605,9 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
557
605
|
def __init__(
|
|
558
606
|
self,
|
|
559
607
|
*,
|
|
560
|
-
|
|
608
|
+
model: __dataclass__init__fields__0__annotation,
|
|
561
609
|
) -> __dataclass__None:
|
|
562
|
-
__dataclass__object_setattr(self, '
|
|
610
|
+
__dataclass__object_setattr(self, 'model', model)
|
|
563
611
|
|
|
564
612
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
565
613
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -569,7 +617,7 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
569
617
|
@__dataclass___recursive_repr()
|
|
570
618
|
def __repr__(self):
|
|
571
619
|
parts = []
|
|
572
|
-
parts.append(f"
|
|
620
|
+
parts.append(f"model={self.model!r}")
|
|
573
621
|
return (
|
|
574
622
|
f"{self.__class__.__qualname__}("
|
|
575
623
|
f"{', '.join(parts)}"
|
|
@@ -586,27 +634,34 @@ def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
|
586
634
|
|
|
587
635
|
@_register(
|
|
588
636
|
plan_repr=(
|
|
589
|
-
"Plans(tup=(CopyPlan(fields=('model',)), EqPlan(fields=('model',)), FrozenPlan(fields=('model
|
|
590
|
-
"
|
|
591
|
-
"name='model', annotation=OpRef(name='init.fields.0.annotation'), default=
|
|
592
|
-
", override=False, field_type=FieldType.INSTANCE, coerce=None, validate=
|
|
593
|
-
"
|
|
594
|
-
"
|
|
595
|
-
"
|
|
637
|
+
"Plans(tup=(CopyPlan(fields=('model', 'stream')), EqPlan(fields=('model', 'stream')), FrozenPlan(fields=('model"
|
|
638
|
+
"', 'stream'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('model', 'stream'), cache=Fals"
|
|
639
|
+
"e), InitPlan(fields=(InitPlan.Field(name='model', annotation=OpRef(name='init.fields.0.annotation'), default=N"
|
|
640
|
+
"one, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=Non"
|
|
641
|
+
"e, check_type=None), InitPlan.Field(name='stream', annotation=OpRef(name='init.fields.1.annotation'), default="
|
|
642
|
+
"OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_type=FieldType.INS"
|
|
643
|
+
"TANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_params=('model"
|
|
644
|
+
"', 'stream'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields="
|
|
645
|
+
"(ReprPlan.Field(name='model', kw_only=True, fn=None), ReprPlan.Field(name='stream', kw_only=True, fn=None)), i"
|
|
646
|
+
"d=False, terse=False, default_fn=None)))"
|
|
596
647
|
),
|
|
597
|
-
plan_repr_sha1='
|
|
648
|
+
plan_repr_sha1='a0c68d946968391197d0c66f362ca6c3fed8d7a2',
|
|
598
649
|
op_ref_idents=(
|
|
599
650
|
'__dataclass__init__fields__0__annotation',
|
|
651
|
+
'__dataclass__init__fields__1__annotation',
|
|
652
|
+
'__dataclass__init__fields__1__default',
|
|
600
653
|
),
|
|
601
654
|
cls_names=(
|
|
602
|
-
('ommlds.backends.ollama.protocol', '
|
|
655
|
+
('ommlds.backends.ollama.protocol', 'BaseStreamableRequest'),
|
|
603
656
|
),
|
|
604
657
|
)
|
|
605
|
-
def
|
|
658
|
+
def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
606
659
|
def _process_dataclass(
|
|
607
660
|
*,
|
|
608
661
|
__dataclass__cls,
|
|
609
662
|
__dataclass__init__fields__0__annotation,
|
|
663
|
+
__dataclass__init__fields__1__annotation,
|
|
664
|
+
__dataclass__init__fields__1__default,
|
|
610
665
|
__dataclass__FieldFnValidationError, # noqa
|
|
611
666
|
__dataclass__FieldTypeValidationError, # noqa
|
|
612
667
|
__dataclass__FnValidationError, # noqa
|
|
@@ -626,6 +681,7 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
626
681
|
raise TypeError(self)
|
|
627
682
|
return __dataclass__cls( # noqa
|
|
628
683
|
model=self.model,
|
|
684
|
+
stream=self.stream,
|
|
629
685
|
)
|
|
630
686
|
|
|
631
687
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -639,7 +695,8 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
639
695
|
if self.__class__ is not other.__class__:
|
|
640
696
|
return NotImplemented
|
|
641
697
|
return (
|
|
642
|
-
self.model == other.model
|
|
698
|
+
self.model == other.model and
|
|
699
|
+
self.stream == other.stream
|
|
643
700
|
)
|
|
644
701
|
|
|
645
702
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -649,6 +706,7 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
649
706
|
|
|
650
707
|
__dataclass___setattr_frozen_fields = {
|
|
651
708
|
'model',
|
|
709
|
+
'stream',
|
|
652
710
|
}
|
|
653
711
|
|
|
654
712
|
def __setattr__(self, name, value):
|
|
@@ -666,6 +724,7 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
666
724
|
|
|
667
725
|
__dataclass___delattr_frozen_fields = {
|
|
668
726
|
'model',
|
|
727
|
+
'stream',
|
|
669
728
|
}
|
|
670
729
|
|
|
671
730
|
def __delattr__(self, name):
|
|
@@ -684,6 +743,7 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
684
743
|
def __hash__(self):
|
|
685
744
|
return hash((
|
|
686
745
|
self.model,
|
|
746
|
+
self.stream,
|
|
687
747
|
))
|
|
688
748
|
|
|
689
749
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -693,8 +753,10 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
693
753
|
self,
|
|
694
754
|
*,
|
|
695
755
|
model: __dataclass__init__fields__0__annotation,
|
|
756
|
+
stream: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
696
757
|
) -> __dataclass__None:
|
|
697
758
|
__dataclass__object_setattr(self, 'model', model)
|
|
759
|
+
__dataclass__object_setattr(self, 'stream', stream)
|
|
698
760
|
|
|
699
761
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
700
762
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -705,6 +767,7 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
705
767
|
def __repr__(self):
|
|
706
768
|
parts = []
|
|
707
769
|
parts.append(f"model={self.model!r}")
|
|
770
|
+
parts.append(f"stream={self.stream!r}")
|
|
708
771
|
return (
|
|
709
772
|
f"{self.__class__.__qualname__}("
|
|
710
773
|
f"{', '.join(parts)}"
|
|
@@ -721,32 +784,38 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
721
784
|
|
|
722
785
|
@_register(
|
|
723
786
|
plan_repr=(
|
|
724
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
725
|
-
"
|
|
726
|
-
" '
|
|
727
|
-
"
|
|
728
|
-
"
|
|
729
|
-
"
|
|
730
|
-
"
|
|
731
|
-
"1.default'), default_factory=None, init=True,
|
|
732
|
-
"
|
|
733
|
-
",
|
|
734
|
-
"
|
|
735
|
-
"name='
|
|
736
|
-
"
|
|
737
|
-
"
|
|
738
|
-
"'), default_factory=None, init=True, override=
|
|
739
|
-
", check_type=None), InitPlan.Field(name='
|
|
740
|
-
"
|
|
741
|
-
"
|
|
742
|
-
"
|
|
743
|
-
"
|
|
744
|
-
"
|
|
745
|
-
"
|
|
746
|
-
"
|
|
747
|
-
"
|
|
787
|
+
"Plans(tup=(CopyPlan(fields=('model', 'stream', 'options', 'format', 'keep_alive', 'messages', 'tools', 'think'"
|
|
788
|
+
")), EqPlan(fields=('model', 'stream', 'options', 'format', 'keep_alive', 'messages', 'tools', 'think')), Froze"
|
|
789
|
+
"nPlan(fields=('model', 'stream', 'options', 'format', 'keep_alive', 'messages', 'tools', 'think'), allow_dynam"
|
|
790
|
+
"ic_dunder_attrs=False), HashPlan(action='add', fields=('model', 'stream', 'options', 'format', 'keep_alive', '"
|
|
791
|
+
"messages', 'tools', 'think'), cache=False), InitPlan(fields=(InitPlan.Field(name='model', annotation=OpRef(nam"
|
|
792
|
+
"e='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=False, field_type=Field"
|
|
793
|
+
"Type.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='stream', annotation=OpRef(na"
|
|
794
|
+
"me='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, "
|
|
795
|
+
"override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(na"
|
|
796
|
+
"me='options', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), "
|
|
797
|
+
"default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, ch"
|
|
798
|
+
"eck_type=None), InitPlan.Field(name='format', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef"
|
|
799
|
+
"(name='init.fields.3.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE"
|
|
800
|
+
", coerce=None, validate=None, check_type=None), InitPlan.Field(name='keep_alive', annotation=OpRef(name='init."
|
|
801
|
+
"fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_factory=None, init=True, override="
|
|
802
|
+
"False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='messa"
|
|
803
|
+
"ges', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(name='init.fields.5.default'), default_"
|
|
804
|
+
"factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type"
|
|
805
|
+
"=None), InitPlan.Field(name='tools', annotation=OpRef(name='init.fields.6.annotation'), default=OpRef(name='in"
|
|
806
|
+
"it.fields.6.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce="
|
|
807
|
+
"None, validate=None, check_type=None), InitPlan.Field(name='think', annotation=OpRef(name='init.fields.7.annot"
|
|
808
|
+
"ation'), default=OpRef(name='init.fields.7.default'), default_factory=None, init=True, override=False, field_t"
|
|
809
|
+
"ype=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_on"
|
|
810
|
+
"ly_params=('model', 'stream', 'options', 'format', 'keep_alive', 'messages', 'tools', 'think'), frozen=True, s"
|
|
811
|
+
"lots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model'"
|
|
812
|
+
", kw_only=True, fn=None), ReprPlan.Field(name='stream', kw_only=True, fn=None), ReprPlan.Field(name='options',"
|
|
813
|
+
" kw_only=True, fn=None), ReprPlan.Field(name='format', kw_only=True, fn=None), ReprPlan.Field(name='keep_alive"
|
|
814
|
+
"', kw_only=True, fn=None), ReprPlan.Field(name='messages', kw_only=True, fn=None), ReprPlan.Field(name='tools'"
|
|
815
|
+
", kw_only=True, fn=None), ReprPlan.Field(name='think', kw_only=True, fn=None)), id=False, terse=False, default"
|
|
816
|
+
"_fn=OpRef(name='repr.default_fn'))))"
|
|
748
817
|
),
|
|
749
|
-
plan_repr_sha1='
|
|
818
|
+
plan_repr_sha1='82c5163f58a3474e87891ea77e9a516262229fcb',
|
|
750
819
|
op_ref_idents=(
|
|
751
820
|
'__dataclass__init__fields__0__annotation',
|
|
752
821
|
'__dataclass__init__fields__1__annotation',
|
|
@@ -759,13 +828,17 @@ def _process_dataclass__3310a48624d055c5c24df97f58e5c8f296523505():
|
|
|
759
828
|
'__dataclass__init__fields__4__default',
|
|
760
829
|
'__dataclass__init__fields__5__annotation',
|
|
761
830
|
'__dataclass__init__fields__5__default',
|
|
831
|
+
'__dataclass__init__fields__6__annotation',
|
|
832
|
+
'__dataclass__init__fields__6__default',
|
|
833
|
+
'__dataclass__init__fields__7__annotation',
|
|
834
|
+
'__dataclass__init__fields__7__default',
|
|
762
835
|
'__dataclass__repr__default_fn',
|
|
763
836
|
),
|
|
764
837
|
cls_names=(
|
|
765
|
-
('ommlds.backends.ollama.protocol', '
|
|
838
|
+
('ommlds.backends.ollama.protocol', 'ChatRequest'),
|
|
766
839
|
),
|
|
767
840
|
)
|
|
768
|
-
def
|
|
841
|
+
def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
769
842
|
def _process_dataclass(
|
|
770
843
|
*,
|
|
771
844
|
__dataclass__cls,
|
|
@@ -780,6 +853,10 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
780
853
|
__dataclass__init__fields__4__default,
|
|
781
854
|
__dataclass__init__fields__5__annotation,
|
|
782
855
|
__dataclass__init__fields__5__default,
|
|
856
|
+
__dataclass__init__fields__6__annotation,
|
|
857
|
+
__dataclass__init__fields__6__default,
|
|
858
|
+
__dataclass__init__fields__7__annotation,
|
|
859
|
+
__dataclass__init__fields__7__default,
|
|
783
860
|
__dataclass__repr__default_fn,
|
|
784
861
|
__dataclass__FieldFnValidationError, # noqa
|
|
785
862
|
__dataclass__FieldTypeValidationError, # noqa
|
|
@@ -799,15 +876,17 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
799
876
|
if self.__class__ is not __dataclass__cls:
|
|
800
877
|
raise TypeError(self)
|
|
801
878
|
return __dataclass__cls( # noqa
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
879
|
+
model=self.model,
|
|
880
|
+
stream=self.stream,
|
|
881
|
+
options=self.options,
|
|
882
|
+
format=self.format,
|
|
883
|
+
keep_alive=self.keep_alive,
|
|
884
|
+
messages=self.messages,
|
|
885
|
+
tools=self.tools,
|
|
886
|
+
think=self.think,
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
811
890
|
if '__copy__' in __dataclass__cls.__dict__:
|
|
812
891
|
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
813
892
|
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
@@ -818,12 +897,14 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
818
897
|
if self.__class__ is not other.__class__:
|
|
819
898
|
return NotImplemented
|
|
820
899
|
return (
|
|
821
|
-
self.
|
|
822
|
-
self.
|
|
823
|
-
self.
|
|
824
|
-
self.
|
|
825
|
-
self.
|
|
826
|
-
self.
|
|
900
|
+
self.model == other.model and
|
|
901
|
+
self.stream == other.stream and
|
|
902
|
+
self.options == other.options and
|
|
903
|
+
self.format == other.format and
|
|
904
|
+
self.keep_alive == other.keep_alive and
|
|
905
|
+
self.messages == other.messages and
|
|
906
|
+
self.tools == other.tools and
|
|
907
|
+
self.think == other.think
|
|
827
908
|
)
|
|
828
909
|
|
|
829
910
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -832,12 +913,14 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
832
913
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
833
914
|
|
|
834
915
|
__dataclass___setattr_frozen_fields = {
|
|
835
|
-
'
|
|
836
|
-
'
|
|
837
|
-
'
|
|
838
|
-
'
|
|
839
|
-
'
|
|
840
|
-
'
|
|
916
|
+
'model',
|
|
917
|
+
'stream',
|
|
918
|
+
'options',
|
|
919
|
+
'format',
|
|
920
|
+
'keep_alive',
|
|
921
|
+
'messages',
|
|
922
|
+
'tools',
|
|
923
|
+
'think',
|
|
841
924
|
}
|
|
842
925
|
|
|
843
926
|
def __setattr__(self, name, value):
|
|
@@ -854,12 +937,14 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
854
937
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
855
938
|
|
|
856
939
|
__dataclass___delattr_frozen_fields = {
|
|
857
|
-
'
|
|
858
|
-
'
|
|
859
|
-
'
|
|
860
|
-
'
|
|
861
|
-
'
|
|
862
|
-
'
|
|
940
|
+
'model',
|
|
941
|
+
'stream',
|
|
942
|
+
'options',
|
|
943
|
+
'format',
|
|
944
|
+
'keep_alive',
|
|
945
|
+
'messages',
|
|
946
|
+
'tools',
|
|
947
|
+
'think',
|
|
863
948
|
}
|
|
864
949
|
|
|
865
950
|
def __delattr__(self, name):
|
|
@@ -877,12 +962,14 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
877
962
|
|
|
878
963
|
def __hash__(self):
|
|
879
964
|
return hash((
|
|
880
|
-
self.
|
|
881
|
-
self.
|
|
882
|
-
self.
|
|
883
|
-
self.
|
|
884
|
-
self.
|
|
885
|
-
self.
|
|
965
|
+
self.model,
|
|
966
|
+
self.stream,
|
|
967
|
+
self.options,
|
|
968
|
+
self.format,
|
|
969
|
+
self.keep_alive,
|
|
970
|
+
self.messages,
|
|
971
|
+
self.tools,
|
|
972
|
+
self.think,
|
|
886
973
|
))
|
|
887
974
|
|
|
888
975
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -891,19 +978,23 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
891
978
|
def __init__(
|
|
892
979
|
self,
|
|
893
980
|
*,
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
981
|
+
model: __dataclass__init__fields__0__annotation,
|
|
982
|
+
stream: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
983
|
+
options: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
984
|
+
format: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
985
|
+
keep_alive: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
986
|
+
messages: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
987
|
+
tools: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
988
|
+
think: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
900
989
|
) -> __dataclass__None:
|
|
901
|
-
__dataclass__object_setattr(self, '
|
|
902
|
-
__dataclass__object_setattr(self, '
|
|
903
|
-
__dataclass__object_setattr(self, '
|
|
904
|
-
__dataclass__object_setattr(self, '
|
|
905
|
-
__dataclass__object_setattr(self, '
|
|
906
|
-
__dataclass__object_setattr(self, '
|
|
990
|
+
__dataclass__object_setattr(self, 'model', model)
|
|
991
|
+
__dataclass__object_setattr(self, 'stream', stream)
|
|
992
|
+
__dataclass__object_setattr(self, 'options', options)
|
|
993
|
+
__dataclass__object_setattr(self, 'format', format)
|
|
994
|
+
__dataclass__object_setattr(self, 'keep_alive', keep_alive)
|
|
995
|
+
__dataclass__object_setattr(self, 'messages', messages)
|
|
996
|
+
__dataclass__object_setattr(self, 'tools', tools)
|
|
997
|
+
__dataclass__object_setattr(self, 'think', think)
|
|
907
998
|
|
|
908
999
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
909
1000
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -913,18 +1004,22 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
913
1004
|
@__dataclass___recursive_repr()
|
|
914
1005
|
def __repr__(self):
|
|
915
1006
|
parts = []
|
|
916
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
917
|
-
parts.append(f"
|
|
918
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
919
|
-
parts.append(f"
|
|
920
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
921
|
-
parts.append(f"
|
|
922
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
923
|
-
parts.append(f"
|
|
924
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
925
|
-
parts.append(f"
|
|
926
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
927
|
-
parts.append(f"
|
|
1007
|
+
if (s := __dataclass__repr__default_fn(self.model)) is not None:
|
|
1008
|
+
parts.append(f"model={s}")
|
|
1009
|
+
if (s := __dataclass__repr__default_fn(self.stream)) is not None:
|
|
1010
|
+
parts.append(f"stream={s}")
|
|
1011
|
+
if (s := __dataclass__repr__default_fn(self.options)) is not None:
|
|
1012
|
+
parts.append(f"options={s}")
|
|
1013
|
+
if (s := __dataclass__repr__default_fn(self.format)) is not None:
|
|
1014
|
+
parts.append(f"format={s}")
|
|
1015
|
+
if (s := __dataclass__repr__default_fn(self.keep_alive)) is not None:
|
|
1016
|
+
parts.append(f"keep_alive={s}")
|
|
1017
|
+
if (s := __dataclass__repr__default_fn(self.messages)) is not None:
|
|
1018
|
+
parts.append(f"messages={s}")
|
|
1019
|
+
if (s := __dataclass__repr__default_fn(self.tools)) is not None:
|
|
1020
|
+
parts.append(f"tools={s}")
|
|
1021
|
+
if (s := __dataclass__repr__default_fn(self.think)) is not None:
|
|
1022
|
+
parts.append(f"think={s}")
|
|
928
1023
|
return (
|
|
929
1024
|
f"{self.__class__.__qualname__}("
|
|
930
1025
|
f"{', '.join(parts)}"
|
|
@@ -941,40 +1036,55 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
941
1036
|
|
|
942
1037
|
@_register(
|
|
943
1038
|
plan_repr=(
|
|
944
|
-
"Plans(tup=(CopyPlan(fields=('model', '
|
|
945
|
-
"
|
|
946
|
-
"
|
|
947
|
-
"
|
|
948
|
-
"
|
|
949
|
-
"
|
|
950
|
-
"
|
|
951
|
-
"
|
|
952
|
-
"
|
|
953
|
-
"
|
|
954
|
-
"
|
|
955
|
-
"
|
|
956
|
-
"(name='init.fields.
|
|
957
|
-
"
|
|
958
|
-
"
|
|
959
|
-
"
|
|
960
|
-
"
|
|
961
|
-
"
|
|
962
|
-
"=None
|
|
963
|
-
"
|
|
964
|
-
"
|
|
965
|
-
"
|
|
966
|
-
"
|
|
967
|
-
"
|
|
968
|
-
"
|
|
969
|
-
",
|
|
970
|
-
"
|
|
971
|
-
"',
|
|
972
|
-
",
|
|
973
|
-
"
|
|
1039
|
+
"Plans(tup=(CopyPlan(fields=('model', 'created_at', 'done', 'done_reason', 'total_duration', 'load_duration', '"
|
|
1040
|
+
"prompt_eval_count', 'prompt_eval_duration', 'eval_count', 'eval_duration', 'message')), EqPlan(fields=('model'"
|
|
1041
|
+
", 'created_at', 'done', 'done_reason', 'total_duration', 'load_duration', 'prompt_eval_count', 'prompt_eval_du"
|
|
1042
|
+
"ration', 'eval_count', 'eval_duration', 'message')), FrozenPlan(fields=('model', 'created_at', 'done', 'done_r"
|
|
1043
|
+
"eason', 'total_duration', 'load_duration', 'prompt_eval_count', 'prompt_eval_duration', 'eval_count', 'eval_du"
|
|
1044
|
+
"ration', 'message'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('model', 'created_at', "
|
|
1045
|
+
"'done', 'done_reason', 'total_duration', 'load_duration', 'prompt_eval_count', 'prompt_eval_duration', 'eval_c"
|
|
1046
|
+
"ount', 'eval_duration', 'message'), cache=False), InitPlan(fields=(InitPlan.Field(name='model', annotation=OpR"
|
|
1047
|
+
"ef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_factory=None, init=T"
|
|
1048
|
+
"rue, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Fie"
|
|
1049
|
+
"ld(name='created_at', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.def"
|
|
1050
|
+
"ault'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate="
|
|
1051
|
+
"None, check_type=None), InitPlan.Field(name='done', annotation=OpRef(name='init.fields.2.annotation'), default"
|
|
1052
|
+
"=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.IN"
|
|
1053
|
+
"STANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='done_reason', annotation=OpRef(name"
|
|
1054
|
+
"='init.fields.3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True, ov"
|
|
1055
|
+
"erride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name"
|
|
1056
|
+
"='total_duration', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.defaul"
|
|
1057
|
+
"t'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=Non"
|
|
1058
|
+
"e, check_type=None), InitPlan.Field(name='load_duration', annotation=OpRef(name='init.fields.5.annotation'), d"
|
|
1059
|
+
"efault=OpRef(name='init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldT"
|
|
1060
|
+
"ype.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='prompt_eval_count', annotatio"
|
|
1061
|
+
"n=OpRef(name='init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), default_factory=None, i"
|
|
1062
|
+
"nit=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPla"
|
|
1063
|
+
"n.Field(name='prompt_eval_duration', annotation=OpRef(name='init.fields.7.annotation'), default=OpRef(name='in"
|
|
1064
|
+
"it.fields.7.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce="
|
|
1065
|
+
"None, validate=None, check_type=None), InitPlan.Field(name='eval_count', annotation=OpRef(name='init.fields.8."
|
|
1066
|
+
"annotation'), default=OpRef(name='init.fields.8.default'), default_factory=None, init=True, override=False, fi"
|
|
1067
|
+
"eld_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='eval_duration'"
|
|
1068
|
+
", annotation=OpRef(name='init.fields.9.annotation'), default=OpRef(name='init.fields.9.default'), default_fact"
|
|
1069
|
+
"ory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=Non"
|
|
1070
|
+
"e), InitPlan.Field(name='message', annotation=OpRef(name='init.fields.10.annotation'), default=None, default_f"
|
|
1071
|
+
"actory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type="
|
|
1072
|
+
"None)), self_param='self', std_params=(), kw_only_params=('model', 'created_at', 'done', 'done_reason', 'total"
|
|
1073
|
+
"_duration', 'load_duration', 'prompt_eval_count', 'prompt_eval_duration', 'eval_count', 'eval_duration', 'mess"
|
|
1074
|
+
"age'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPl"
|
|
1075
|
+
"an.Field(name='model', kw_only=True, fn=None), ReprPlan.Field(name='created_at', kw_only=True, fn=None), ReprP"
|
|
1076
|
+
"lan.Field(name='done', kw_only=True, fn=None), ReprPlan.Field(name='done_reason', kw_only=True, fn=None), Repr"
|
|
1077
|
+
"Plan.Field(name='total_duration', kw_only=True, fn=None), ReprPlan.Field(name='load_duration', kw_only=True, f"
|
|
1078
|
+
"n=None), ReprPlan.Field(name='prompt_eval_count', kw_only=True, fn=None), ReprPlan.Field(name='prompt_eval_dur"
|
|
1079
|
+
"ation', kw_only=True, fn=None), ReprPlan.Field(name='eval_count', kw_only=True, fn=None), ReprPlan.Field(name="
|
|
1080
|
+
"'eval_duration', kw_only=True, fn=None), ReprPlan.Field(name='message', kw_only=True, fn=None)), id=False, ter"
|
|
1081
|
+
"se=False, default_fn=OpRef(name='repr.default_fn'))))"
|
|
974
1082
|
),
|
|
975
|
-
plan_repr_sha1='
|
|
1083
|
+
plan_repr_sha1='f14f2c9137552599b1b611852176514b259abb93',
|
|
976
1084
|
op_ref_idents=(
|
|
977
1085
|
'__dataclass__init__fields__0__annotation',
|
|
1086
|
+
'__dataclass__init__fields__0__default',
|
|
1087
|
+
'__dataclass__init__fields__10__annotation',
|
|
978
1088
|
'__dataclass__init__fields__1__annotation',
|
|
979
1089
|
'__dataclass__init__fields__1__default',
|
|
980
1090
|
'__dataclass__init__fields__2__annotation',
|
|
@@ -989,17 +1099,23 @@ def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
|
989
1099
|
'__dataclass__init__fields__6__default',
|
|
990
1100
|
'__dataclass__init__fields__7__annotation',
|
|
991
1101
|
'__dataclass__init__fields__7__default',
|
|
1102
|
+
'__dataclass__init__fields__8__annotation',
|
|
1103
|
+
'__dataclass__init__fields__8__default',
|
|
1104
|
+
'__dataclass__init__fields__9__annotation',
|
|
1105
|
+
'__dataclass__init__fields__9__default',
|
|
992
1106
|
'__dataclass__repr__default_fn',
|
|
993
1107
|
),
|
|
994
1108
|
cls_names=(
|
|
995
|
-
('ommlds.backends.ollama.protocol', '
|
|
1109
|
+
('ommlds.backends.ollama.protocol', 'ChatResponse'),
|
|
996
1110
|
),
|
|
997
1111
|
)
|
|
998
|
-
def
|
|
1112
|
+
def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
999
1113
|
def _process_dataclass(
|
|
1000
1114
|
*,
|
|
1001
1115
|
__dataclass__cls,
|
|
1002
1116
|
__dataclass__init__fields__0__annotation,
|
|
1117
|
+
__dataclass__init__fields__0__default,
|
|
1118
|
+
__dataclass__init__fields__10__annotation,
|
|
1003
1119
|
__dataclass__init__fields__1__annotation,
|
|
1004
1120
|
__dataclass__init__fields__1__default,
|
|
1005
1121
|
__dataclass__init__fields__2__annotation,
|
|
@@ -1014,6 +1130,10 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1014
1130
|
__dataclass__init__fields__6__default,
|
|
1015
1131
|
__dataclass__init__fields__7__annotation,
|
|
1016
1132
|
__dataclass__init__fields__7__default,
|
|
1133
|
+
__dataclass__init__fields__8__annotation,
|
|
1134
|
+
__dataclass__init__fields__8__default,
|
|
1135
|
+
__dataclass__init__fields__9__annotation,
|
|
1136
|
+
__dataclass__init__fields__9__default,
|
|
1017
1137
|
__dataclass__repr__default_fn,
|
|
1018
1138
|
__dataclass__FieldFnValidationError, # noqa
|
|
1019
1139
|
__dataclass__FieldTypeValidationError, # noqa
|
|
@@ -1034,13 +1154,16 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1034
1154
|
raise TypeError(self)
|
|
1035
1155
|
return __dataclass__cls( # noqa
|
|
1036
1156
|
model=self.model,
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1157
|
+
created_at=self.created_at,
|
|
1158
|
+
done=self.done,
|
|
1159
|
+
done_reason=self.done_reason,
|
|
1160
|
+
total_duration=self.total_duration,
|
|
1161
|
+
load_duration=self.load_duration,
|
|
1162
|
+
prompt_eval_count=self.prompt_eval_count,
|
|
1163
|
+
prompt_eval_duration=self.prompt_eval_duration,
|
|
1164
|
+
eval_count=self.eval_count,
|
|
1165
|
+
eval_duration=self.eval_duration,
|
|
1166
|
+
message=self.message,
|
|
1044
1167
|
)
|
|
1045
1168
|
|
|
1046
1169
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -1055,13 +1178,16 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1055
1178
|
return NotImplemented
|
|
1056
1179
|
return (
|
|
1057
1180
|
self.model == other.model and
|
|
1058
|
-
self.
|
|
1059
|
-
self.
|
|
1060
|
-
self.
|
|
1061
|
-
self.
|
|
1062
|
-
self.
|
|
1063
|
-
self.
|
|
1064
|
-
self.
|
|
1181
|
+
self.created_at == other.created_at and
|
|
1182
|
+
self.done == other.done and
|
|
1183
|
+
self.done_reason == other.done_reason and
|
|
1184
|
+
self.total_duration == other.total_duration and
|
|
1185
|
+
self.load_duration == other.load_duration and
|
|
1186
|
+
self.prompt_eval_count == other.prompt_eval_count and
|
|
1187
|
+
self.prompt_eval_duration == other.prompt_eval_duration and
|
|
1188
|
+
self.eval_count == other.eval_count and
|
|
1189
|
+
self.eval_duration == other.eval_duration and
|
|
1190
|
+
self.message == other.message
|
|
1065
1191
|
)
|
|
1066
1192
|
|
|
1067
1193
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -1071,14 +1197,17 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1071
1197
|
|
|
1072
1198
|
__dataclass___setattr_frozen_fields = {
|
|
1073
1199
|
'model',
|
|
1074
|
-
'
|
|
1075
|
-
'
|
|
1076
|
-
'
|
|
1077
|
-
'
|
|
1078
|
-
'
|
|
1079
|
-
'
|
|
1080
|
-
'
|
|
1081
|
-
|
|
1200
|
+
'created_at',
|
|
1201
|
+
'done',
|
|
1202
|
+
'done_reason',
|
|
1203
|
+
'total_duration',
|
|
1204
|
+
'load_duration',
|
|
1205
|
+
'prompt_eval_count',
|
|
1206
|
+
'prompt_eval_duration',
|
|
1207
|
+
'eval_count',
|
|
1208
|
+
'eval_duration',
|
|
1209
|
+
'message',
|
|
1210
|
+
}
|
|
1082
1211
|
|
|
1083
1212
|
def __setattr__(self, name, value):
|
|
1084
1213
|
if (
|
|
@@ -1095,13 +1224,16 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1095
1224
|
|
|
1096
1225
|
__dataclass___delattr_frozen_fields = {
|
|
1097
1226
|
'model',
|
|
1098
|
-
'
|
|
1099
|
-
'
|
|
1100
|
-
'
|
|
1101
|
-
'
|
|
1102
|
-
'
|
|
1103
|
-
'
|
|
1104
|
-
'
|
|
1227
|
+
'created_at',
|
|
1228
|
+
'done',
|
|
1229
|
+
'done_reason',
|
|
1230
|
+
'total_duration',
|
|
1231
|
+
'load_duration',
|
|
1232
|
+
'prompt_eval_count',
|
|
1233
|
+
'prompt_eval_duration',
|
|
1234
|
+
'eval_count',
|
|
1235
|
+
'eval_duration',
|
|
1236
|
+
'message',
|
|
1105
1237
|
}
|
|
1106
1238
|
|
|
1107
1239
|
def __delattr__(self, name):
|
|
@@ -1120,13 +1252,16 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1120
1252
|
def __hash__(self):
|
|
1121
1253
|
return hash((
|
|
1122
1254
|
self.model,
|
|
1123
|
-
self.
|
|
1124
|
-
self.
|
|
1125
|
-
self.
|
|
1126
|
-
self.
|
|
1127
|
-
self.
|
|
1128
|
-
self.
|
|
1129
|
-
self.
|
|
1255
|
+
self.created_at,
|
|
1256
|
+
self.done,
|
|
1257
|
+
self.done_reason,
|
|
1258
|
+
self.total_duration,
|
|
1259
|
+
self.load_duration,
|
|
1260
|
+
self.prompt_eval_count,
|
|
1261
|
+
self.prompt_eval_duration,
|
|
1262
|
+
self.eval_count,
|
|
1263
|
+
self.eval_duration,
|
|
1264
|
+
self.message,
|
|
1130
1265
|
))
|
|
1131
1266
|
|
|
1132
1267
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -1135,23 +1270,29 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1135
1270
|
def __init__(
|
|
1136
1271
|
self,
|
|
1137
1272
|
*,
|
|
1138
|
-
model: __dataclass__init__fields__0__annotation,
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1273
|
+
model: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
1274
|
+
created_at: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1275
|
+
done: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
1276
|
+
done_reason: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
1277
|
+
total_duration: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
1278
|
+
load_duration: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
1279
|
+
prompt_eval_count: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
1280
|
+
prompt_eval_duration: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
1281
|
+
eval_count: __dataclass__init__fields__8__annotation = __dataclass__init__fields__8__default,
|
|
1282
|
+
eval_duration: __dataclass__init__fields__9__annotation = __dataclass__init__fields__9__default,
|
|
1283
|
+
message: __dataclass__init__fields__10__annotation,
|
|
1146
1284
|
) -> __dataclass__None:
|
|
1147
1285
|
__dataclass__object_setattr(self, 'model', model)
|
|
1148
|
-
__dataclass__object_setattr(self, '
|
|
1149
|
-
__dataclass__object_setattr(self, '
|
|
1150
|
-
__dataclass__object_setattr(self, '
|
|
1151
|
-
__dataclass__object_setattr(self, '
|
|
1152
|
-
__dataclass__object_setattr(self, '
|
|
1153
|
-
__dataclass__object_setattr(self, '
|
|
1154
|
-
__dataclass__object_setattr(self, '
|
|
1286
|
+
__dataclass__object_setattr(self, 'created_at', created_at)
|
|
1287
|
+
__dataclass__object_setattr(self, 'done', done)
|
|
1288
|
+
__dataclass__object_setattr(self, 'done_reason', done_reason)
|
|
1289
|
+
__dataclass__object_setattr(self, 'total_duration', total_duration)
|
|
1290
|
+
__dataclass__object_setattr(self, 'load_duration', load_duration)
|
|
1291
|
+
__dataclass__object_setattr(self, 'prompt_eval_count', prompt_eval_count)
|
|
1292
|
+
__dataclass__object_setattr(self, 'prompt_eval_duration', prompt_eval_duration)
|
|
1293
|
+
__dataclass__object_setattr(self, 'eval_count', eval_count)
|
|
1294
|
+
__dataclass__object_setattr(self, 'eval_duration', eval_duration)
|
|
1295
|
+
__dataclass__object_setattr(self, 'message', message)
|
|
1155
1296
|
|
|
1156
1297
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1157
1298
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -1163,20 +1304,26 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1163
1304
|
parts = []
|
|
1164
1305
|
if (s := __dataclass__repr__default_fn(self.model)) is not None:
|
|
1165
1306
|
parts.append(f"model={s}")
|
|
1166
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1167
|
-
parts.append(f"
|
|
1168
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1169
|
-
parts.append(f"
|
|
1170
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1171
|
-
parts.append(f"
|
|
1172
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1173
|
-
parts.append(f"
|
|
1174
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1175
|
-
parts.append(f"
|
|
1176
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1177
|
-
parts.append(f"
|
|
1178
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1179
|
-
parts.append(f"
|
|
1307
|
+
if (s := __dataclass__repr__default_fn(self.created_at)) is not None:
|
|
1308
|
+
parts.append(f"created_at={s}")
|
|
1309
|
+
if (s := __dataclass__repr__default_fn(self.done)) is not None:
|
|
1310
|
+
parts.append(f"done={s}")
|
|
1311
|
+
if (s := __dataclass__repr__default_fn(self.done_reason)) is not None:
|
|
1312
|
+
parts.append(f"done_reason={s}")
|
|
1313
|
+
if (s := __dataclass__repr__default_fn(self.total_duration)) is not None:
|
|
1314
|
+
parts.append(f"total_duration={s}")
|
|
1315
|
+
if (s := __dataclass__repr__default_fn(self.load_duration)) is not None:
|
|
1316
|
+
parts.append(f"load_duration={s}")
|
|
1317
|
+
if (s := __dataclass__repr__default_fn(self.prompt_eval_count)) is not None:
|
|
1318
|
+
parts.append(f"prompt_eval_count={s}")
|
|
1319
|
+
if (s := __dataclass__repr__default_fn(self.prompt_eval_duration)) is not None:
|
|
1320
|
+
parts.append(f"prompt_eval_duration={s}")
|
|
1321
|
+
if (s := __dataclass__repr__default_fn(self.eval_count)) is not None:
|
|
1322
|
+
parts.append(f"eval_count={s}")
|
|
1323
|
+
if (s := __dataclass__repr__default_fn(self.eval_duration)) is not None:
|
|
1324
|
+
parts.append(f"eval_duration={s}")
|
|
1325
|
+
if (s := __dataclass__repr__default_fn(self.message)) is not None:
|
|
1326
|
+
parts.append(f"message={s}")
|
|
1180
1327
|
return (
|
|
1181
1328
|
f"{self.__class__.__qualname__}("
|
|
1182
1329
|
f"{', '.join(parts)}"
|
|
@@ -1193,30 +1340,62 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1193
1340
|
|
|
1194
1341
|
@_register(
|
|
1195
1342
|
plan_repr=(
|
|
1196
|
-
"Plans(tup=(CopyPlan(fields=('model', 'stream', 'options', 'format', 'keep_alive'
|
|
1197
|
-
"
|
|
1198
|
-
"
|
|
1199
|
-
"
|
|
1200
|
-
"
|
|
1201
|
-
"
|
|
1202
|
-
"
|
|
1203
|
-
"
|
|
1204
|
-
"
|
|
1205
|
-
"
|
|
1206
|
-
"
|
|
1207
|
-
"
|
|
1208
|
-
"
|
|
1209
|
-
"
|
|
1210
|
-
"
|
|
1211
|
-
"
|
|
1212
|
-
"
|
|
1213
|
-
"
|
|
1214
|
-
"
|
|
1215
|
-
",
|
|
1343
|
+
"Plans(tup=(CopyPlan(fields=('model', 'stream', 'options', 'format', 'keep_alive', 'prompt', 'suffix', 'system'"
|
|
1344
|
+
", 'template', 'context', 'raw', 'images', 'think')), EqPlan(fields=('model', 'stream', 'options', 'format', 'k"
|
|
1345
|
+
"eep_alive', 'prompt', 'suffix', 'system', 'template', 'context', 'raw', 'images', 'think')), FrozenPlan(fields"
|
|
1346
|
+
"=('model', 'stream', 'options', 'format', 'keep_alive', 'prompt', 'suffix', 'system', 'template', 'context', '"
|
|
1347
|
+
"raw', 'images', 'think'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('model', 'stream',"
|
|
1348
|
+
" 'options', 'format', 'keep_alive', 'prompt', 'suffix', 'system', 'template', 'context', 'raw', 'images', 'thi"
|
|
1349
|
+
"nk'), cache=False), InitPlan(fields=(InitPlan.Field(name='model', annotation=OpRef(name='init.fields.0.annotat"
|
|
1350
|
+
"ion'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=No"
|
|
1351
|
+
"ne, validate=None, check_type=None), InitPlan.Field(name='stream', annotation=OpRef(name='init.fields.1.annota"
|
|
1352
|
+
"tion'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_ty"
|
|
1353
|
+
"pe=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='options', annotation"
|
|
1354
|
+
"=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_factory=None, in"
|
|
1355
|
+
"it=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan"
|
|
1356
|
+
".Field(name='format', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.def"
|
|
1357
|
+
"ault'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate="
|
|
1358
|
+
"None, check_type=None), InitPlan.Field(name='keep_alive', annotation=OpRef(name='init.fields.4.annotation'), d"
|
|
1359
|
+
"efault=OpRef(name='init.fields.4.default'), default_factory=None, init=True, override=False, field_type=FieldT"
|
|
1360
|
+
"ype.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='prompt', annotation=OpRef(nam"
|
|
1361
|
+
"e='init.fields.5.annotation'), default=OpRef(name='init.fields.5.default'), default_factory=None, init=True, o"
|
|
1362
|
+
"verride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(nam"
|
|
1363
|
+
"e='suffix', annotation=OpRef(name='init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), de"
|
|
1364
|
+
"fault_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, chec"
|
|
1365
|
+
"k_type=None), InitPlan.Field(name='system', annotation=OpRef(name='init.fields.7.annotation'), default=OpRef(n"
|
|
1366
|
+
"ame='init.fields.7.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, "
|
|
1367
|
+
"coerce=None, validate=None, check_type=None), InitPlan.Field(name='template', annotation=OpRef(name='init.fiel"
|
|
1368
|
+
"ds.8.annotation'), default=OpRef(name='init.fields.8.default'), default_factory=None, init=True, override=Fals"
|
|
1369
|
+
"e, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='context',"
|
|
1370
|
+
" annotation=OpRef(name='init.fields.9.annotation'), default=OpRef(name='init.fields.9.default'), default_facto"
|
|
1371
|
+
"ry=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None"
|
|
1372
|
+
"), InitPlan.Field(name='raw', annotation=OpRef(name='init.fields.10.annotation'), default=OpRef(name='init.fie"
|
|
1373
|
+
"lds.10.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None,"
|
|
1374
|
+
" validate=None, check_type=None), InitPlan.Field(name='images', annotation=OpRef(name='init.fields.11.annotati"
|
|
1375
|
+
"on'), default=OpRef(name='init.fields.11.default'), default_factory=None, init=True, override=False, field_typ"
|
|
1376
|
+
"e=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='think', annotation=Op"
|
|
1377
|
+
"Ref(name='init.fields.12.annotation'), default=OpRef(name='init.fields.12.default'), default_factory=None, ini"
|
|
1378
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_par"
|
|
1379
|
+
"am='self', std_params=(), kw_only_params=('model', 'stream', 'options', 'format', 'keep_alive', 'prompt', 'suf"
|
|
1380
|
+
"fix', 'system', 'template', 'context', 'raw', 'images', 'think'), frozen=True, slots=False, post_init_params=N"
|
|
1381
|
+
"one, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model', kw_only=True, fn=None), Repr"
|
|
1382
|
+
"Plan.Field(name='stream', kw_only=True, fn=None), ReprPlan.Field(name='options', kw_only=True, fn=None), ReprP"
|
|
1383
|
+
"lan.Field(name='format', kw_only=True, fn=None), ReprPlan.Field(name='keep_alive', kw_only=True, fn=None), Rep"
|
|
1384
|
+
"rPlan.Field(name='prompt', kw_only=True, fn=None), ReprPlan.Field(name='suffix', kw_only=True, fn=None), ReprP"
|
|
1385
|
+
"lan.Field(name='system', kw_only=True, fn=None), ReprPlan.Field(name='template', kw_only=True, fn=None), ReprP"
|
|
1386
|
+
"lan.Field(name='context', kw_only=True, fn=None), ReprPlan.Field(name='raw', kw_only=True, fn=None), ReprPlan."
|
|
1387
|
+
"Field(name='images', kw_only=True, fn=None), ReprPlan.Field(name='think', kw_only=True, fn=None)), id=False, t"
|
|
1388
|
+
"erse=False, default_fn=OpRef(name='repr.default_fn'))))"
|
|
1216
1389
|
),
|
|
1217
|
-
plan_repr_sha1='
|
|
1390
|
+
plan_repr_sha1='e8b909b51aff3e1fd8203ee672cfc0bab5067233',
|
|
1218
1391
|
op_ref_idents=(
|
|
1219
1392
|
'__dataclass__init__fields__0__annotation',
|
|
1393
|
+
'__dataclass__init__fields__10__annotation',
|
|
1394
|
+
'__dataclass__init__fields__10__default',
|
|
1395
|
+
'__dataclass__init__fields__11__annotation',
|
|
1396
|
+
'__dataclass__init__fields__11__default',
|
|
1397
|
+
'__dataclass__init__fields__12__annotation',
|
|
1398
|
+
'__dataclass__init__fields__12__default',
|
|
1220
1399
|
'__dataclass__init__fields__1__annotation',
|
|
1221
1400
|
'__dataclass__init__fields__1__default',
|
|
1222
1401
|
'__dataclass__init__fields__2__annotation',
|
|
@@ -1225,16 +1404,33 @@ def _process_dataclass__82c5163f58a3474e87891ea77e9a516262229fcb():
|
|
|
1225
1404
|
'__dataclass__init__fields__3__default',
|
|
1226
1405
|
'__dataclass__init__fields__4__annotation',
|
|
1227
1406
|
'__dataclass__init__fields__4__default',
|
|
1407
|
+
'__dataclass__init__fields__5__annotation',
|
|
1408
|
+
'__dataclass__init__fields__5__default',
|
|
1409
|
+
'__dataclass__init__fields__6__annotation',
|
|
1410
|
+
'__dataclass__init__fields__6__default',
|
|
1411
|
+
'__dataclass__init__fields__7__annotation',
|
|
1412
|
+
'__dataclass__init__fields__7__default',
|
|
1413
|
+
'__dataclass__init__fields__8__annotation',
|
|
1414
|
+
'__dataclass__init__fields__8__default',
|
|
1415
|
+
'__dataclass__init__fields__9__annotation',
|
|
1416
|
+
'__dataclass__init__fields__9__default',
|
|
1417
|
+
'__dataclass__repr__default_fn',
|
|
1228
1418
|
),
|
|
1229
1419
|
cls_names=(
|
|
1230
|
-
('ommlds.backends.ollama.protocol', '
|
|
1420
|
+
('ommlds.backends.ollama.protocol', 'GenerateRequest'),
|
|
1231
1421
|
),
|
|
1232
1422
|
)
|
|
1233
|
-
def
|
|
1423
|
+
def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
1234
1424
|
def _process_dataclass(
|
|
1235
1425
|
*,
|
|
1236
1426
|
__dataclass__cls,
|
|
1237
1427
|
__dataclass__init__fields__0__annotation,
|
|
1428
|
+
__dataclass__init__fields__10__annotation,
|
|
1429
|
+
__dataclass__init__fields__10__default,
|
|
1430
|
+
__dataclass__init__fields__11__annotation,
|
|
1431
|
+
__dataclass__init__fields__11__default,
|
|
1432
|
+
__dataclass__init__fields__12__annotation,
|
|
1433
|
+
__dataclass__init__fields__12__default,
|
|
1238
1434
|
__dataclass__init__fields__1__annotation,
|
|
1239
1435
|
__dataclass__init__fields__1__default,
|
|
1240
1436
|
__dataclass__init__fields__2__annotation,
|
|
@@ -1243,6 +1439,17 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1243
1439
|
__dataclass__init__fields__3__default,
|
|
1244
1440
|
__dataclass__init__fields__4__annotation,
|
|
1245
1441
|
__dataclass__init__fields__4__default,
|
|
1442
|
+
__dataclass__init__fields__5__annotation,
|
|
1443
|
+
__dataclass__init__fields__5__default,
|
|
1444
|
+
__dataclass__init__fields__6__annotation,
|
|
1445
|
+
__dataclass__init__fields__6__default,
|
|
1446
|
+
__dataclass__init__fields__7__annotation,
|
|
1447
|
+
__dataclass__init__fields__7__default,
|
|
1448
|
+
__dataclass__init__fields__8__annotation,
|
|
1449
|
+
__dataclass__init__fields__8__default,
|
|
1450
|
+
__dataclass__init__fields__9__annotation,
|
|
1451
|
+
__dataclass__init__fields__9__default,
|
|
1452
|
+
__dataclass__repr__default_fn,
|
|
1246
1453
|
__dataclass__FieldFnValidationError, # noqa
|
|
1247
1454
|
__dataclass__FieldTypeValidationError, # noqa
|
|
1248
1455
|
__dataclass__FnValidationError, # noqa
|
|
@@ -1266,6 +1473,14 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1266
1473
|
options=self.options,
|
|
1267
1474
|
format=self.format,
|
|
1268
1475
|
keep_alive=self.keep_alive,
|
|
1476
|
+
prompt=self.prompt,
|
|
1477
|
+
suffix=self.suffix,
|
|
1478
|
+
system=self.system,
|
|
1479
|
+
template=self.template,
|
|
1480
|
+
context=self.context,
|
|
1481
|
+
raw=self.raw,
|
|
1482
|
+
images=self.images,
|
|
1483
|
+
think=self.think,
|
|
1269
1484
|
)
|
|
1270
1485
|
|
|
1271
1486
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -1283,7 +1498,15 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1283
1498
|
self.stream == other.stream and
|
|
1284
1499
|
self.options == other.options and
|
|
1285
1500
|
self.format == other.format and
|
|
1286
|
-
self.keep_alive == other.keep_alive
|
|
1501
|
+
self.keep_alive == other.keep_alive and
|
|
1502
|
+
self.prompt == other.prompt and
|
|
1503
|
+
self.suffix == other.suffix and
|
|
1504
|
+
self.system == other.system and
|
|
1505
|
+
self.template == other.template and
|
|
1506
|
+
self.context == other.context and
|
|
1507
|
+
self.raw == other.raw and
|
|
1508
|
+
self.images == other.images and
|
|
1509
|
+
self.think == other.think
|
|
1287
1510
|
)
|
|
1288
1511
|
|
|
1289
1512
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -1297,6 +1520,14 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1297
1520
|
'options',
|
|
1298
1521
|
'format',
|
|
1299
1522
|
'keep_alive',
|
|
1523
|
+
'prompt',
|
|
1524
|
+
'suffix',
|
|
1525
|
+
'system',
|
|
1526
|
+
'template',
|
|
1527
|
+
'context',
|
|
1528
|
+
'raw',
|
|
1529
|
+
'images',
|
|
1530
|
+
'think',
|
|
1300
1531
|
}
|
|
1301
1532
|
|
|
1302
1533
|
def __setattr__(self, name, value):
|
|
@@ -1318,6 +1549,14 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1318
1549
|
'options',
|
|
1319
1550
|
'format',
|
|
1320
1551
|
'keep_alive',
|
|
1552
|
+
'prompt',
|
|
1553
|
+
'suffix',
|
|
1554
|
+
'system',
|
|
1555
|
+
'template',
|
|
1556
|
+
'context',
|
|
1557
|
+
'raw',
|
|
1558
|
+
'images',
|
|
1559
|
+
'think',
|
|
1321
1560
|
}
|
|
1322
1561
|
|
|
1323
1562
|
def __delattr__(self, name):
|
|
@@ -1340,7 +1579,15 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1340
1579
|
self.options,
|
|
1341
1580
|
self.format,
|
|
1342
1581
|
self.keep_alive,
|
|
1343
|
-
|
|
1582
|
+
self.prompt,
|
|
1583
|
+
self.suffix,
|
|
1584
|
+
self.system,
|
|
1585
|
+
self.template,
|
|
1586
|
+
self.context,
|
|
1587
|
+
self.raw,
|
|
1588
|
+
self.images,
|
|
1589
|
+
self.think,
|
|
1590
|
+
))
|
|
1344
1591
|
|
|
1345
1592
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1346
1593
|
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
@@ -1353,12 +1600,28 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1353
1600
|
options: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
1354
1601
|
format: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
1355
1602
|
keep_alive: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
1603
|
+
prompt: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
1604
|
+
suffix: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
1605
|
+
system: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
1606
|
+
template: __dataclass__init__fields__8__annotation = __dataclass__init__fields__8__default,
|
|
1607
|
+
context: __dataclass__init__fields__9__annotation = __dataclass__init__fields__9__default,
|
|
1608
|
+
raw: __dataclass__init__fields__10__annotation = __dataclass__init__fields__10__default,
|
|
1609
|
+
images: __dataclass__init__fields__11__annotation = __dataclass__init__fields__11__default,
|
|
1610
|
+
think: __dataclass__init__fields__12__annotation = __dataclass__init__fields__12__default,
|
|
1356
1611
|
) -> __dataclass__None:
|
|
1357
1612
|
__dataclass__object_setattr(self, 'model', model)
|
|
1358
1613
|
__dataclass__object_setattr(self, 'stream', stream)
|
|
1359
1614
|
__dataclass__object_setattr(self, 'options', options)
|
|
1360
1615
|
__dataclass__object_setattr(self, 'format', format)
|
|
1361
1616
|
__dataclass__object_setattr(self, 'keep_alive', keep_alive)
|
|
1617
|
+
__dataclass__object_setattr(self, 'prompt', prompt)
|
|
1618
|
+
__dataclass__object_setattr(self, 'suffix', suffix)
|
|
1619
|
+
__dataclass__object_setattr(self, 'system', system)
|
|
1620
|
+
__dataclass__object_setattr(self, 'template', template)
|
|
1621
|
+
__dataclass__object_setattr(self, 'context', context)
|
|
1622
|
+
__dataclass__object_setattr(self, 'raw', raw)
|
|
1623
|
+
__dataclass__object_setattr(self, 'images', images)
|
|
1624
|
+
__dataclass__object_setattr(self, 'think', think)
|
|
1362
1625
|
|
|
1363
1626
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1364
1627
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -1368,11 +1631,32 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1368
1631
|
@__dataclass___recursive_repr()
|
|
1369
1632
|
def __repr__(self):
|
|
1370
1633
|
parts = []
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1634
|
+
if (s := __dataclass__repr__default_fn(self.model)) is not None:
|
|
1635
|
+
parts.append(f"model={s}")
|
|
1636
|
+
if (s := __dataclass__repr__default_fn(self.stream)) is not None:
|
|
1637
|
+
parts.append(f"stream={s}")
|
|
1638
|
+
if (s := __dataclass__repr__default_fn(self.options)) is not None:
|
|
1639
|
+
parts.append(f"options={s}")
|
|
1640
|
+
if (s := __dataclass__repr__default_fn(self.format)) is not None:
|
|
1641
|
+
parts.append(f"format={s}")
|
|
1642
|
+
if (s := __dataclass__repr__default_fn(self.keep_alive)) is not None:
|
|
1643
|
+
parts.append(f"keep_alive={s}")
|
|
1644
|
+
if (s := __dataclass__repr__default_fn(self.prompt)) is not None:
|
|
1645
|
+
parts.append(f"prompt={s}")
|
|
1646
|
+
if (s := __dataclass__repr__default_fn(self.suffix)) is not None:
|
|
1647
|
+
parts.append(f"suffix={s}")
|
|
1648
|
+
if (s := __dataclass__repr__default_fn(self.system)) is not None:
|
|
1649
|
+
parts.append(f"system={s}")
|
|
1650
|
+
if (s := __dataclass__repr__default_fn(self.template)) is not None:
|
|
1651
|
+
parts.append(f"template={s}")
|
|
1652
|
+
if (s := __dataclass__repr__default_fn(self.context)) is not None:
|
|
1653
|
+
parts.append(f"context={s}")
|
|
1654
|
+
if (s := __dataclass__repr__default_fn(self.raw)) is not None:
|
|
1655
|
+
parts.append(f"raw={s}")
|
|
1656
|
+
if (s := __dataclass__repr__default_fn(self.images)) is not None:
|
|
1657
|
+
parts.append(f"images={s}")
|
|
1658
|
+
if (s := __dataclass__repr__default_fn(self.think)) is not None:
|
|
1659
|
+
parts.append(f"think={s}")
|
|
1376
1660
|
return (
|
|
1377
1661
|
f"{self.__class__.__qualname__}("
|
|
1378
1662
|
f"{', '.join(parts)}"
|
|
@@ -1389,37 +1673,119 @@ def _process_dataclass__845e863b03ee92ab7c5b27be3dfabfb54b948c5d():
|
|
|
1389
1673
|
|
|
1390
1674
|
@_register(
|
|
1391
1675
|
plan_repr=(
|
|
1392
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
1393
|
-
"
|
|
1394
|
-
"
|
|
1395
|
-
"
|
|
1396
|
-
"
|
|
1397
|
-
"
|
|
1398
|
-
"
|
|
1399
|
-
"
|
|
1400
|
-
"),
|
|
1401
|
-
"'
|
|
1676
|
+
"Plans(tup=(CopyPlan(fields=('model', 'created_at', 'done', 'done_reason', 'total_duration', 'load_duration', '"
|
|
1677
|
+
"prompt_eval_count', 'prompt_eval_duration', 'eval_count', 'eval_duration', 'response', 'thinking', 'context'))"
|
|
1678
|
+
", EqPlan(fields=('model', 'created_at', 'done', 'done_reason', 'total_duration', 'load_duration', 'prompt_eval"
|
|
1679
|
+
"_count', 'prompt_eval_duration', 'eval_count', 'eval_duration', 'response', 'thinking', 'context')), FrozenPla"
|
|
1680
|
+
"n(fields=('model', 'created_at', 'done', 'done_reason', 'total_duration', 'load_duration', 'prompt_eval_count'"
|
|
1681
|
+
", 'prompt_eval_duration', 'eval_count', 'eval_duration', 'response', 'thinking', 'context'), allow_dynamic_dun"
|
|
1682
|
+
"der_attrs=False), HashPlan(action='add', fields=('model', 'created_at', 'done', 'done_reason', 'total_duration"
|
|
1683
|
+
"', 'load_duration', 'prompt_eval_count', 'prompt_eval_duration', 'eval_count', 'eval_duration', 'response', 't"
|
|
1684
|
+
"hinking', 'context'), cache=False), InitPlan(fields=(InitPlan.Field(name='model', annotation=OpRef(name='init."
|
|
1685
|
+
"fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_factory=None, init=True, override="
|
|
1686
|
+
"False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='creat"
|
|
1687
|
+
"ed_at', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), defaul"
|
|
1688
|
+
"t_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_ty"
|
|
1689
|
+
"pe=None), InitPlan.Field(name='done', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='i"
|
|
1690
|
+
"nit.fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce"
|
|
1691
|
+
"=None, validate=None, check_type=None), InitPlan.Field(name='done_reason', annotation=OpRef(name='init.fields."
|
|
1692
|
+
"3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True, override=False, "
|
|
1693
|
+
"field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='total_durati"
|
|
1694
|
+
"on', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_f"
|
|
1695
|
+
"actory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type="
|
|
1696
|
+
"None), InitPlan.Field(name='load_duration', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(n"
|
|
1697
|
+
"ame='init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, "
|
|
1698
|
+
"coerce=None, validate=None, check_type=None), InitPlan.Field(name='prompt_eval_count', annotation=OpRef(name='"
|
|
1699
|
+
"init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), default_factory=None, init=True, over"
|
|
1700
|
+
"ride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='"
|
|
1701
|
+
"prompt_eval_duration', annotation=OpRef(name='init.fields.7.annotation'), default=OpRef(name='init.fields.7.de"
|
|
1702
|
+
"fault'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate"
|
|
1703
|
+
"=None, check_type=None), InitPlan.Field(name='eval_count', annotation=OpRef(name='init.fields.8.annotation'), "
|
|
1704
|
+
"default=OpRef(name='init.fields.8.default'), default_factory=None, init=True, override=False, field_type=Field"
|
|
1705
|
+
"Type.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='eval_duration', annotation=O"
|
|
1706
|
+
"pRef(name='init.fields.9.annotation'), default=OpRef(name='init.fields.9.default'), default_factory=None, init"
|
|
1707
|
+
"=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.F"
|
|
1708
|
+
"ield(name='response', annotation=OpRef(name='init.fields.10.annotation'), default=None, default_factory=None, "
|
|
1709
|
+
"init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPl"
|
|
1710
|
+
"an.Field(name='thinking', annotation=OpRef(name='init.fields.11.annotation'), default=OpRef(name='init.fields."
|
|
1711
|
+
"11.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, val"
|
|
1712
|
+
"idate=None, check_type=None), InitPlan.Field(name='context', annotation=OpRef(name='init.fields.12.annotation'"
|
|
1713
|
+
"), default=OpRef(name='init.fields.12.default'), default_factory=None, init=True, override=False, field_type=F"
|
|
1714
|
+
"ieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_pa"
|
|
1715
|
+
"rams=('model', 'created_at', 'done', 'done_reason', 'total_duration', 'load_duration', 'prompt_eval_count', 'p"
|
|
1716
|
+
"rompt_eval_duration', 'eval_count', 'eval_duration', 'response', 'thinking', 'context'), frozen=True, slots=Fa"
|
|
1717
|
+
"lse, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model', kw_on"
|
|
1718
|
+
"ly=True, fn=None), ReprPlan.Field(name='created_at', kw_only=True, fn=None), ReprPlan.Field(name='done', kw_on"
|
|
1719
|
+
"ly=True, fn=None), ReprPlan.Field(name='done_reason', kw_only=True, fn=None), ReprPlan.Field(name='total_durat"
|
|
1720
|
+
"ion', kw_only=True, fn=None), ReprPlan.Field(name='load_duration', kw_only=True, fn=None), ReprPlan.Field(name"
|
|
1721
|
+
"='prompt_eval_count', kw_only=True, fn=None), ReprPlan.Field(name='prompt_eval_duration', kw_only=True, fn=Non"
|
|
1722
|
+
"e), ReprPlan.Field(name='eval_count', kw_only=True, fn=None), ReprPlan.Field(name='eval_duration', kw_only=Tru"
|
|
1723
|
+
"e, fn=None), ReprPlan.Field(name='response', kw_only=True, fn=None), ReprPlan.Field(name='thinking', kw_only=T"
|
|
1724
|
+
"rue, fn=None), ReprPlan.Field(name='context', kw_only=True, fn=None)), id=False, terse=False, default_fn=OpRef"
|
|
1725
|
+
"(name='repr.default_fn'))))"
|
|
1402
1726
|
),
|
|
1403
|
-
plan_repr_sha1='
|
|
1727
|
+
plan_repr_sha1='d4de027591ccf1da84a98a2734b94a36c6340c4b',
|
|
1404
1728
|
op_ref_idents=(
|
|
1405
1729
|
'__dataclass__init__fields__0__annotation',
|
|
1406
1730
|
'__dataclass__init__fields__0__default',
|
|
1731
|
+
'__dataclass__init__fields__10__annotation',
|
|
1732
|
+
'__dataclass__init__fields__11__annotation',
|
|
1733
|
+
'__dataclass__init__fields__11__default',
|
|
1734
|
+
'__dataclass__init__fields__12__annotation',
|
|
1735
|
+
'__dataclass__init__fields__12__default',
|
|
1407
1736
|
'__dataclass__init__fields__1__annotation',
|
|
1408
1737
|
'__dataclass__init__fields__1__default',
|
|
1738
|
+
'__dataclass__init__fields__2__annotation',
|
|
1739
|
+
'__dataclass__init__fields__2__default',
|
|
1740
|
+
'__dataclass__init__fields__3__annotation',
|
|
1741
|
+
'__dataclass__init__fields__3__default',
|
|
1742
|
+
'__dataclass__init__fields__4__annotation',
|
|
1743
|
+
'__dataclass__init__fields__4__default',
|
|
1744
|
+
'__dataclass__init__fields__5__annotation',
|
|
1745
|
+
'__dataclass__init__fields__5__default',
|
|
1746
|
+
'__dataclass__init__fields__6__annotation',
|
|
1747
|
+
'__dataclass__init__fields__6__default',
|
|
1748
|
+
'__dataclass__init__fields__7__annotation',
|
|
1749
|
+
'__dataclass__init__fields__7__default',
|
|
1750
|
+
'__dataclass__init__fields__8__annotation',
|
|
1751
|
+
'__dataclass__init__fields__8__default',
|
|
1752
|
+
'__dataclass__init__fields__9__annotation',
|
|
1753
|
+
'__dataclass__init__fields__9__default',
|
|
1409
1754
|
'__dataclass__repr__default_fn',
|
|
1410
1755
|
),
|
|
1411
1756
|
cls_names=(
|
|
1412
|
-
('ommlds.backends.ollama.protocol', '
|
|
1757
|
+
('ommlds.backends.ollama.protocol', 'GenerateResponse'),
|
|
1413
1758
|
),
|
|
1414
1759
|
)
|
|
1415
|
-
def
|
|
1760
|
+
def _process_dataclass__d4de027591ccf1da84a98a2734b94a36c6340c4b():
|
|
1416
1761
|
def _process_dataclass(
|
|
1417
1762
|
*,
|
|
1418
1763
|
__dataclass__cls,
|
|
1419
1764
|
__dataclass__init__fields__0__annotation,
|
|
1420
1765
|
__dataclass__init__fields__0__default,
|
|
1766
|
+
__dataclass__init__fields__10__annotation,
|
|
1767
|
+
__dataclass__init__fields__11__annotation,
|
|
1768
|
+
__dataclass__init__fields__11__default,
|
|
1769
|
+
__dataclass__init__fields__12__annotation,
|
|
1770
|
+
__dataclass__init__fields__12__default,
|
|
1421
1771
|
__dataclass__init__fields__1__annotation,
|
|
1422
1772
|
__dataclass__init__fields__1__default,
|
|
1773
|
+
__dataclass__init__fields__2__annotation,
|
|
1774
|
+
__dataclass__init__fields__2__default,
|
|
1775
|
+
__dataclass__init__fields__3__annotation,
|
|
1776
|
+
__dataclass__init__fields__3__default,
|
|
1777
|
+
__dataclass__init__fields__4__annotation,
|
|
1778
|
+
__dataclass__init__fields__4__default,
|
|
1779
|
+
__dataclass__init__fields__5__annotation,
|
|
1780
|
+
__dataclass__init__fields__5__default,
|
|
1781
|
+
__dataclass__init__fields__6__annotation,
|
|
1782
|
+
__dataclass__init__fields__6__default,
|
|
1783
|
+
__dataclass__init__fields__7__annotation,
|
|
1784
|
+
__dataclass__init__fields__7__default,
|
|
1785
|
+
__dataclass__init__fields__8__annotation,
|
|
1786
|
+
__dataclass__init__fields__8__default,
|
|
1787
|
+
__dataclass__init__fields__9__annotation,
|
|
1788
|
+
__dataclass__init__fields__9__default,
|
|
1423
1789
|
__dataclass__repr__default_fn,
|
|
1424
1790
|
__dataclass__FieldFnValidationError, # noqa
|
|
1425
1791
|
__dataclass__FieldTypeValidationError, # noqa
|
|
@@ -1439,8 +1805,19 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1439
1805
|
if self.__class__ is not __dataclass__cls:
|
|
1440
1806
|
raise TypeError(self)
|
|
1441
1807
|
return __dataclass__cls( # noqa
|
|
1442
|
-
|
|
1443
|
-
|
|
1808
|
+
model=self.model,
|
|
1809
|
+
created_at=self.created_at,
|
|
1810
|
+
done=self.done,
|
|
1811
|
+
done_reason=self.done_reason,
|
|
1812
|
+
total_duration=self.total_duration,
|
|
1813
|
+
load_duration=self.load_duration,
|
|
1814
|
+
prompt_eval_count=self.prompt_eval_count,
|
|
1815
|
+
prompt_eval_duration=self.prompt_eval_duration,
|
|
1816
|
+
eval_count=self.eval_count,
|
|
1817
|
+
eval_duration=self.eval_duration,
|
|
1818
|
+
response=self.response,
|
|
1819
|
+
thinking=self.thinking,
|
|
1820
|
+
context=self.context,
|
|
1444
1821
|
)
|
|
1445
1822
|
|
|
1446
1823
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -1454,8 +1831,19 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1454
1831
|
if self.__class__ is not other.__class__:
|
|
1455
1832
|
return NotImplemented
|
|
1456
1833
|
return (
|
|
1457
|
-
self.
|
|
1458
|
-
self.
|
|
1834
|
+
self.model == other.model and
|
|
1835
|
+
self.created_at == other.created_at and
|
|
1836
|
+
self.done == other.done and
|
|
1837
|
+
self.done_reason == other.done_reason and
|
|
1838
|
+
self.total_duration == other.total_duration and
|
|
1839
|
+
self.load_duration == other.load_duration and
|
|
1840
|
+
self.prompt_eval_count == other.prompt_eval_count and
|
|
1841
|
+
self.prompt_eval_duration == other.prompt_eval_duration and
|
|
1842
|
+
self.eval_count == other.eval_count and
|
|
1843
|
+
self.eval_duration == other.eval_duration and
|
|
1844
|
+
self.response == other.response and
|
|
1845
|
+
self.thinking == other.thinking and
|
|
1846
|
+
self.context == other.context
|
|
1459
1847
|
)
|
|
1460
1848
|
|
|
1461
1849
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -1464,8 +1852,19 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1464
1852
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1465
1853
|
|
|
1466
1854
|
__dataclass___setattr_frozen_fields = {
|
|
1467
|
-
'
|
|
1468
|
-
'
|
|
1855
|
+
'model',
|
|
1856
|
+
'created_at',
|
|
1857
|
+
'done',
|
|
1858
|
+
'done_reason',
|
|
1859
|
+
'total_duration',
|
|
1860
|
+
'load_duration',
|
|
1861
|
+
'prompt_eval_count',
|
|
1862
|
+
'prompt_eval_duration',
|
|
1863
|
+
'eval_count',
|
|
1864
|
+
'eval_duration',
|
|
1865
|
+
'response',
|
|
1866
|
+
'thinking',
|
|
1867
|
+
'context',
|
|
1469
1868
|
}
|
|
1470
1869
|
|
|
1471
1870
|
def __setattr__(self, name, value):
|
|
@@ -1482,8 +1881,19 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1482
1881
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1483
1882
|
|
|
1484
1883
|
__dataclass___delattr_frozen_fields = {
|
|
1485
|
-
'
|
|
1486
|
-
'
|
|
1884
|
+
'model',
|
|
1885
|
+
'created_at',
|
|
1886
|
+
'done',
|
|
1887
|
+
'done_reason',
|
|
1888
|
+
'total_duration',
|
|
1889
|
+
'load_duration',
|
|
1890
|
+
'prompt_eval_count',
|
|
1891
|
+
'prompt_eval_duration',
|
|
1892
|
+
'eval_count',
|
|
1893
|
+
'eval_duration',
|
|
1894
|
+
'response',
|
|
1895
|
+
'thinking',
|
|
1896
|
+
'context',
|
|
1487
1897
|
}
|
|
1488
1898
|
|
|
1489
1899
|
def __delattr__(self, name):
|
|
@@ -1501,8 +1911,19 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1501
1911
|
|
|
1502
1912
|
def __hash__(self):
|
|
1503
1913
|
return hash((
|
|
1504
|
-
self.
|
|
1505
|
-
self.
|
|
1914
|
+
self.model,
|
|
1915
|
+
self.created_at,
|
|
1916
|
+
self.done,
|
|
1917
|
+
self.done_reason,
|
|
1918
|
+
self.total_duration,
|
|
1919
|
+
self.load_duration,
|
|
1920
|
+
self.prompt_eval_count,
|
|
1921
|
+
self.prompt_eval_duration,
|
|
1922
|
+
self.eval_count,
|
|
1923
|
+
self.eval_duration,
|
|
1924
|
+
self.response,
|
|
1925
|
+
self.thinking,
|
|
1926
|
+
self.context,
|
|
1506
1927
|
))
|
|
1507
1928
|
|
|
1508
1929
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -1511,11 +1932,33 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1511
1932
|
def __init__(
|
|
1512
1933
|
self,
|
|
1513
1934
|
*,
|
|
1514
|
-
|
|
1515
|
-
|
|
1935
|
+
model: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
1936
|
+
created_at: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1937
|
+
done: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
1938
|
+
done_reason: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
1939
|
+
total_duration: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
1940
|
+
load_duration: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
1941
|
+
prompt_eval_count: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
1942
|
+
prompt_eval_duration: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
1943
|
+
eval_count: __dataclass__init__fields__8__annotation = __dataclass__init__fields__8__default,
|
|
1944
|
+
eval_duration: __dataclass__init__fields__9__annotation = __dataclass__init__fields__9__default,
|
|
1945
|
+
response: __dataclass__init__fields__10__annotation,
|
|
1946
|
+
thinking: __dataclass__init__fields__11__annotation = __dataclass__init__fields__11__default,
|
|
1947
|
+
context: __dataclass__init__fields__12__annotation = __dataclass__init__fields__12__default,
|
|
1516
1948
|
) -> __dataclass__None:
|
|
1517
|
-
__dataclass__object_setattr(self, '
|
|
1518
|
-
__dataclass__object_setattr(self, '
|
|
1949
|
+
__dataclass__object_setattr(self, 'model', model)
|
|
1950
|
+
__dataclass__object_setattr(self, 'created_at', created_at)
|
|
1951
|
+
__dataclass__object_setattr(self, 'done', done)
|
|
1952
|
+
__dataclass__object_setattr(self, 'done_reason', done_reason)
|
|
1953
|
+
__dataclass__object_setattr(self, 'total_duration', total_duration)
|
|
1954
|
+
__dataclass__object_setattr(self, 'load_duration', load_duration)
|
|
1955
|
+
__dataclass__object_setattr(self, 'prompt_eval_count', prompt_eval_count)
|
|
1956
|
+
__dataclass__object_setattr(self, 'prompt_eval_duration', prompt_eval_duration)
|
|
1957
|
+
__dataclass__object_setattr(self, 'eval_count', eval_count)
|
|
1958
|
+
__dataclass__object_setattr(self, 'eval_duration', eval_duration)
|
|
1959
|
+
__dataclass__object_setattr(self, 'response', response)
|
|
1960
|
+
__dataclass__object_setattr(self, 'thinking', thinking)
|
|
1961
|
+
__dataclass__object_setattr(self, 'context', context)
|
|
1519
1962
|
|
|
1520
1963
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1521
1964
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -1525,10 +1968,32 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1525
1968
|
@__dataclass___recursive_repr()
|
|
1526
1969
|
def __repr__(self):
|
|
1527
1970
|
parts = []
|
|
1528
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1529
|
-
parts.append(f"
|
|
1530
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
1531
|
-
parts.append(f"
|
|
1971
|
+
if (s := __dataclass__repr__default_fn(self.model)) is not None:
|
|
1972
|
+
parts.append(f"model={s}")
|
|
1973
|
+
if (s := __dataclass__repr__default_fn(self.created_at)) is not None:
|
|
1974
|
+
parts.append(f"created_at={s}")
|
|
1975
|
+
if (s := __dataclass__repr__default_fn(self.done)) is not None:
|
|
1976
|
+
parts.append(f"done={s}")
|
|
1977
|
+
if (s := __dataclass__repr__default_fn(self.done_reason)) is not None:
|
|
1978
|
+
parts.append(f"done_reason={s}")
|
|
1979
|
+
if (s := __dataclass__repr__default_fn(self.total_duration)) is not None:
|
|
1980
|
+
parts.append(f"total_duration={s}")
|
|
1981
|
+
if (s := __dataclass__repr__default_fn(self.load_duration)) is not None:
|
|
1982
|
+
parts.append(f"load_duration={s}")
|
|
1983
|
+
if (s := __dataclass__repr__default_fn(self.prompt_eval_count)) is not None:
|
|
1984
|
+
parts.append(f"prompt_eval_count={s}")
|
|
1985
|
+
if (s := __dataclass__repr__default_fn(self.prompt_eval_duration)) is not None:
|
|
1986
|
+
parts.append(f"prompt_eval_duration={s}")
|
|
1987
|
+
if (s := __dataclass__repr__default_fn(self.eval_count)) is not None:
|
|
1988
|
+
parts.append(f"eval_count={s}")
|
|
1989
|
+
if (s := __dataclass__repr__default_fn(self.eval_duration)) is not None:
|
|
1990
|
+
parts.append(f"eval_duration={s}")
|
|
1991
|
+
if (s := __dataclass__repr__default_fn(self.response)) is not None:
|
|
1992
|
+
parts.append(f"response={s}")
|
|
1993
|
+
if (s := __dataclass__repr__default_fn(self.thinking)) is not None:
|
|
1994
|
+
parts.append(f"thinking={s}")
|
|
1995
|
+
if (s := __dataclass__repr__default_fn(self.context)) is not None:
|
|
1996
|
+
parts.append(f"context={s}")
|
|
1532
1997
|
return (
|
|
1533
1998
|
f"{self.__class__.__qualname__}("
|
|
1534
1999
|
f"{', '.join(parts)}"
|
|
@@ -1545,34 +2010,66 @@ def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
|
1545
2010
|
|
|
1546
2011
|
@_register(
|
|
1547
2012
|
plan_repr=(
|
|
1548
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
1549
|
-
"', '
|
|
1550
|
-
"
|
|
1551
|
-
"
|
|
1552
|
-
"
|
|
1553
|
-
"
|
|
1554
|
-
"
|
|
1555
|
-
"',
|
|
1556
|
-
"
|
|
1557
|
-
"
|
|
2013
|
+
"Plans(tup=(CopyPlan(fields=('role', 'content', 'thinking', 'images', 'tool_name', 'tool_calls')), EqPlan(field"
|
|
2014
|
+
"s=('role', 'content', 'thinking', 'images', 'tool_name', 'tool_calls')), FrozenPlan(fields=('role', 'content',"
|
|
2015
|
+
" 'thinking', 'images', 'tool_name', 'tool_calls'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', f"
|
|
2016
|
+
"ields=('role', 'content', 'thinking', 'images', 'tool_name', 'tool_calls'), cache=False), InitPlan(fields=(Ini"
|
|
2017
|
+
"tPlan.Field(name='role', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None"
|
|
2018
|
+
", init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), Init"
|
|
2019
|
+
"Plan.Field(name='content', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields."
|
|
2020
|
+
"1.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, vali"
|
|
2021
|
+
"date=None, check_type=None), InitPlan.Field(name='thinking', annotation=OpRef(name='init.fields.2.annotation')"
|
|
2022
|
+
", default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_type=Fie"
|
|
2023
|
+
"ldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='images', annotation=OpRef("
|
|
2024
|
+
"name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True"
|
|
2025
|
+
", override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field("
|
|
2026
|
+
"name='tool_name', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default"
|
|
2027
|
+
"'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None"
|
|
2028
|
+
", check_type=None), InitPlan.Field(name='tool_calls', annotation=OpRef(name='init.fields.5.annotation'), defau"
|
|
2029
|
+
"lt=OpRef(name='init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldType."
|
|
2030
|
+
"INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_params=('ro"
|
|
2031
|
+
"le', 'content', 'thinking', 'images', 'tool_name', 'tool_calls'), frozen=True, slots=False, post_init_params=N"
|
|
2032
|
+
"one, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='role', kw_only=True, fn=None), ReprP"
|
|
2033
|
+
"lan.Field(name='content', kw_only=True, fn=None), ReprPlan.Field(name='thinking', kw_only=True, fn=None), Repr"
|
|
2034
|
+
"Plan.Field(name='images', kw_only=True, fn=None), ReprPlan.Field(name='tool_name', kw_only=True, fn=None), Rep"
|
|
2035
|
+
"rPlan.Field(name='tool_calls', kw_only=True, fn=None)), id=False, terse=False, default_fn=OpRef(name='repr.def"
|
|
2036
|
+
"ault_fn'))))"
|
|
1558
2037
|
),
|
|
1559
|
-
plan_repr_sha1='
|
|
2038
|
+
plan_repr_sha1='5ed26fc5132f873daeaffa682785bd1b47768acb',
|
|
1560
2039
|
op_ref_idents=(
|
|
1561
2040
|
'__dataclass__init__fields__0__annotation',
|
|
1562
2041
|
'__dataclass__init__fields__1__annotation',
|
|
1563
2042
|
'__dataclass__init__fields__1__default',
|
|
2043
|
+
'__dataclass__init__fields__2__annotation',
|
|
2044
|
+
'__dataclass__init__fields__2__default',
|
|
2045
|
+
'__dataclass__init__fields__3__annotation',
|
|
2046
|
+
'__dataclass__init__fields__3__default',
|
|
2047
|
+
'__dataclass__init__fields__4__annotation',
|
|
2048
|
+
'__dataclass__init__fields__4__default',
|
|
2049
|
+
'__dataclass__init__fields__5__annotation',
|
|
2050
|
+
'__dataclass__init__fields__5__default',
|
|
2051
|
+
'__dataclass__repr__default_fn',
|
|
1564
2052
|
),
|
|
1565
2053
|
cls_names=(
|
|
1566
|
-
('ommlds.backends.ollama.protocol', '
|
|
2054
|
+
('ommlds.backends.ollama.protocol', 'Message'),
|
|
1567
2055
|
),
|
|
1568
2056
|
)
|
|
1569
|
-
def
|
|
2057
|
+
def _process_dataclass__5ed26fc5132f873daeaffa682785bd1b47768acb():
|
|
1570
2058
|
def _process_dataclass(
|
|
1571
2059
|
*,
|
|
1572
2060
|
__dataclass__cls,
|
|
1573
2061
|
__dataclass__init__fields__0__annotation,
|
|
1574
2062
|
__dataclass__init__fields__1__annotation,
|
|
1575
2063
|
__dataclass__init__fields__1__default,
|
|
2064
|
+
__dataclass__init__fields__2__annotation,
|
|
2065
|
+
__dataclass__init__fields__2__default,
|
|
2066
|
+
__dataclass__init__fields__3__annotation,
|
|
2067
|
+
__dataclass__init__fields__3__default,
|
|
2068
|
+
__dataclass__init__fields__4__annotation,
|
|
2069
|
+
__dataclass__init__fields__4__default,
|
|
2070
|
+
__dataclass__init__fields__5__annotation,
|
|
2071
|
+
__dataclass__init__fields__5__default,
|
|
2072
|
+
__dataclass__repr__default_fn,
|
|
1576
2073
|
__dataclass__FieldFnValidationError, # noqa
|
|
1577
2074
|
__dataclass__FieldTypeValidationError, # noqa
|
|
1578
2075
|
__dataclass__FnValidationError, # noqa
|
|
@@ -1591,8 +2088,12 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1591
2088
|
if self.__class__ is not __dataclass__cls:
|
|
1592
2089
|
raise TypeError(self)
|
|
1593
2090
|
return __dataclass__cls( # noqa
|
|
1594
|
-
|
|
1595
|
-
|
|
2091
|
+
role=self.role,
|
|
2092
|
+
content=self.content,
|
|
2093
|
+
thinking=self.thinking,
|
|
2094
|
+
images=self.images,
|
|
2095
|
+
tool_name=self.tool_name,
|
|
2096
|
+
tool_calls=self.tool_calls,
|
|
1596
2097
|
)
|
|
1597
2098
|
|
|
1598
2099
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -1606,8 +2107,12 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1606
2107
|
if self.__class__ is not other.__class__:
|
|
1607
2108
|
return NotImplemented
|
|
1608
2109
|
return (
|
|
1609
|
-
self.
|
|
1610
|
-
self.
|
|
2110
|
+
self.role == other.role and
|
|
2111
|
+
self.content == other.content and
|
|
2112
|
+
self.thinking == other.thinking and
|
|
2113
|
+
self.images == other.images and
|
|
2114
|
+
self.tool_name == other.tool_name and
|
|
2115
|
+
self.tool_calls == other.tool_calls
|
|
1611
2116
|
)
|
|
1612
2117
|
|
|
1613
2118
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -1616,8 +2121,12 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1616
2121
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1617
2122
|
|
|
1618
2123
|
__dataclass___setattr_frozen_fields = {
|
|
1619
|
-
'
|
|
1620
|
-
'
|
|
2124
|
+
'role',
|
|
2125
|
+
'content',
|
|
2126
|
+
'thinking',
|
|
2127
|
+
'images',
|
|
2128
|
+
'tool_name',
|
|
2129
|
+
'tool_calls',
|
|
1621
2130
|
}
|
|
1622
2131
|
|
|
1623
2132
|
def __setattr__(self, name, value):
|
|
@@ -1634,8 +2143,12 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1634
2143
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1635
2144
|
|
|
1636
2145
|
__dataclass___delattr_frozen_fields = {
|
|
1637
|
-
'
|
|
1638
|
-
'
|
|
2146
|
+
'role',
|
|
2147
|
+
'content',
|
|
2148
|
+
'thinking',
|
|
2149
|
+
'images',
|
|
2150
|
+
'tool_name',
|
|
2151
|
+
'tool_calls',
|
|
1639
2152
|
}
|
|
1640
2153
|
|
|
1641
2154
|
def __delattr__(self, name):
|
|
@@ -1653,8 +2166,12 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1653
2166
|
|
|
1654
2167
|
def __hash__(self):
|
|
1655
2168
|
return hash((
|
|
1656
|
-
self.
|
|
1657
|
-
self.
|
|
2169
|
+
self.role,
|
|
2170
|
+
self.content,
|
|
2171
|
+
self.thinking,
|
|
2172
|
+
self.images,
|
|
2173
|
+
self.tool_name,
|
|
2174
|
+
self.tool_calls,
|
|
1658
2175
|
))
|
|
1659
2176
|
|
|
1660
2177
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -1663,11 +2180,19 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1663
2180
|
def __init__(
|
|
1664
2181
|
self,
|
|
1665
2182
|
*,
|
|
1666
|
-
|
|
1667
|
-
|
|
2183
|
+
role: __dataclass__init__fields__0__annotation,
|
|
2184
|
+
content: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
2185
|
+
thinking: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
2186
|
+
images: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
2187
|
+
tool_name: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
2188
|
+
tool_calls: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
1668
2189
|
) -> __dataclass__None:
|
|
1669
|
-
__dataclass__object_setattr(self, '
|
|
1670
|
-
__dataclass__object_setattr(self, '
|
|
2190
|
+
__dataclass__object_setattr(self, 'role', role)
|
|
2191
|
+
__dataclass__object_setattr(self, 'content', content)
|
|
2192
|
+
__dataclass__object_setattr(self, 'thinking', thinking)
|
|
2193
|
+
__dataclass__object_setattr(self, 'images', images)
|
|
2194
|
+
__dataclass__object_setattr(self, 'tool_name', tool_name)
|
|
2195
|
+
__dataclass__object_setattr(self, 'tool_calls', tool_calls)
|
|
1671
2196
|
|
|
1672
2197
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1673
2198
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -1677,8 +2202,18 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1677
2202
|
@__dataclass___recursive_repr()
|
|
1678
2203
|
def __repr__(self):
|
|
1679
2204
|
parts = []
|
|
1680
|
-
|
|
1681
|
-
|
|
2205
|
+
if (s := __dataclass__repr__default_fn(self.role)) is not None:
|
|
2206
|
+
parts.append(f"role={s}")
|
|
2207
|
+
if (s := __dataclass__repr__default_fn(self.content)) is not None:
|
|
2208
|
+
parts.append(f"content={s}")
|
|
2209
|
+
if (s := __dataclass__repr__default_fn(self.thinking)) is not None:
|
|
2210
|
+
parts.append(f"thinking={s}")
|
|
2211
|
+
if (s := __dataclass__repr__default_fn(self.images)) is not None:
|
|
2212
|
+
parts.append(f"images={s}")
|
|
2213
|
+
if (s := __dataclass__repr__default_fn(self.tool_name)) is not None:
|
|
2214
|
+
parts.append(f"tool_name={s}")
|
|
2215
|
+
if (s := __dataclass__repr__default_fn(self.tool_calls)) is not None:
|
|
2216
|
+
parts.append(f"tool_calls={s}")
|
|
1682
2217
|
return (
|
|
1683
2218
|
f"{self.__class__.__qualname__}("
|
|
1684
2219
|
f"{', '.join(parts)}"
|
|
@@ -1695,46 +2230,27 @@ def _process_dataclass__a0c68d946968391197d0c66f362ca6c3fed8d7a2():
|
|
|
1695
2230
|
|
|
1696
2231
|
@_register(
|
|
1697
2232
|
plan_repr=(
|
|
1698
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
1699
|
-
"
|
|
1700
|
-
"
|
|
1701
|
-
"
|
|
1702
|
-
"
|
|
1703
|
-
"
|
|
1704
|
-
"
|
|
1705
|
-
"CE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='parameters', annotation=OpRef(name='ini"
|
|
1706
|
-
"t.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, overrid"
|
|
1707
|
-
"e=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_"
|
|
1708
|
-
"params=(), kw_only_params=('name', 'description', 'parameters'), frozen=True, slots=False, post_init_params=No"
|
|
1709
|
-
"ne, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', kw_only=True, fn=None), ReprPl"
|
|
1710
|
-
"an.Field(name='description', kw_only=True, fn=None), ReprPlan.Field(name='parameters', kw_only=True, fn=None))"
|
|
1711
|
-
", id=False, terse=False, default_fn=OpRef(name='repr.default_fn'))))"
|
|
2233
|
+
"Plans(tup=(CopyPlan(fields=('function',)), EqPlan(fields=('function',)), FrozenPlan(fields=('function',), allo"
|
|
2234
|
+
"w_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('function',), cache=False), InitPlan(fields=(Ini"
|
|
2235
|
+
"tPlan.Field(name='function', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory="
|
|
2236
|
+
"None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),)"
|
|
2237
|
+
", self_param='self', std_params=(), kw_only_params=('function',), frozen=True, slots=False, post_init_params=N"
|
|
2238
|
+
"one, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='function', kw_only=True, fn=None),),"
|
|
2239
|
+
" id=False, terse=False, default_fn=None)))"
|
|
1712
2240
|
),
|
|
1713
|
-
plan_repr_sha1='
|
|
2241
|
+
plan_repr_sha1='28bc958fe5292af1c044c0092dc3974a3184df3d',
|
|
1714
2242
|
op_ref_idents=(
|
|
1715
2243
|
'__dataclass__init__fields__0__annotation',
|
|
1716
|
-
'__dataclass__init__fields__0__default',
|
|
1717
|
-
'__dataclass__init__fields__1__annotation',
|
|
1718
|
-
'__dataclass__init__fields__1__default',
|
|
1719
|
-
'__dataclass__init__fields__2__annotation',
|
|
1720
|
-
'__dataclass__init__fields__2__default',
|
|
1721
|
-
'__dataclass__repr__default_fn',
|
|
1722
2244
|
),
|
|
1723
2245
|
cls_names=(
|
|
1724
|
-
('ommlds.backends.ollama.protocol', '
|
|
2246
|
+
('ommlds.backends.ollama.protocol', 'Message.ToolCall'),
|
|
1725
2247
|
),
|
|
1726
2248
|
)
|
|
1727
|
-
def
|
|
2249
|
+
def _process_dataclass__28bc958fe5292af1c044c0092dc3974a3184df3d():
|
|
1728
2250
|
def _process_dataclass(
|
|
1729
2251
|
*,
|
|
1730
2252
|
__dataclass__cls,
|
|
1731
2253
|
__dataclass__init__fields__0__annotation,
|
|
1732
|
-
__dataclass__init__fields__0__default,
|
|
1733
|
-
__dataclass__init__fields__1__annotation,
|
|
1734
|
-
__dataclass__init__fields__1__default,
|
|
1735
|
-
__dataclass__init__fields__2__annotation,
|
|
1736
|
-
__dataclass__init__fields__2__default,
|
|
1737
|
-
__dataclass__repr__default_fn,
|
|
1738
2254
|
__dataclass__FieldFnValidationError, # noqa
|
|
1739
2255
|
__dataclass__FieldTypeValidationError, # noqa
|
|
1740
2256
|
__dataclass__FnValidationError, # noqa
|
|
@@ -1753,9 +2269,7 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1753
2269
|
if self.__class__ is not __dataclass__cls:
|
|
1754
2270
|
raise TypeError(self)
|
|
1755
2271
|
return __dataclass__cls( # noqa
|
|
1756
|
-
|
|
1757
|
-
description=self.description,
|
|
1758
|
-
parameters=self.parameters,
|
|
2272
|
+
function=self.function,
|
|
1759
2273
|
)
|
|
1760
2274
|
|
|
1761
2275
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -1769,9 +2283,7 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1769
2283
|
if self.__class__ is not other.__class__:
|
|
1770
2284
|
return NotImplemented
|
|
1771
2285
|
return (
|
|
1772
|
-
self.
|
|
1773
|
-
self.description == other.description and
|
|
1774
|
-
self.parameters == other.parameters
|
|
2286
|
+
self.function == other.function
|
|
1775
2287
|
)
|
|
1776
2288
|
|
|
1777
2289
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -1780,9 +2292,7 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1780
2292
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1781
2293
|
|
|
1782
2294
|
__dataclass___setattr_frozen_fields = {
|
|
1783
|
-
'
|
|
1784
|
-
'description',
|
|
1785
|
-
'parameters',
|
|
2295
|
+
'function',
|
|
1786
2296
|
}
|
|
1787
2297
|
|
|
1788
2298
|
def __setattr__(self, name, value):
|
|
@@ -1799,9 +2309,7 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1799
2309
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1800
2310
|
|
|
1801
2311
|
__dataclass___delattr_frozen_fields = {
|
|
1802
|
-
'
|
|
1803
|
-
'description',
|
|
1804
|
-
'parameters',
|
|
2312
|
+
'function',
|
|
1805
2313
|
}
|
|
1806
2314
|
|
|
1807
2315
|
def __delattr__(self, name):
|
|
@@ -1819,9 +2327,7 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1819
2327
|
|
|
1820
2328
|
def __hash__(self):
|
|
1821
2329
|
return hash((
|
|
1822
|
-
self.
|
|
1823
|
-
self.description,
|
|
1824
|
-
self.parameters,
|
|
2330
|
+
self.function,
|
|
1825
2331
|
))
|
|
1826
2332
|
|
|
1827
2333
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -1830,13 +2336,9 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1830
2336
|
def __init__(
|
|
1831
2337
|
self,
|
|
1832
2338
|
*,
|
|
1833
|
-
|
|
1834
|
-
description: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1835
|
-
parameters: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
2339
|
+
function: __dataclass__init__fields__0__annotation,
|
|
1836
2340
|
) -> __dataclass__None:
|
|
1837
|
-
__dataclass__object_setattr(self, '
|
|
1838
|
-
__dataclass__object_setattr(self, 'description', description)
|
|
1839
|
-
__dataclass__object_setattr(self, 'parameters', parameters)
|
|
2341
|
+
__dataclass__object_setattr(self, 'function', function)
|
|
1840
2342
|
|
|
1841
2343
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1842
2344
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -1846,12 +2348,7 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1846
2348
|
@__dataclass___recursive_repr()
|
|
1847
2349
|
def __repr__(self):
|
|
1848
2350
|
parts = []
|
|
1849
|
-
|
|
1850
|
-
parts.append(f"name={s}")
|
|
1851
|
-
if (s := __dataclass__repr__default_fn(self.description)) is not None:
|
|
1852
|
-
parts.append(f"description={s}")
|
|
1853
|
-
if (s := __dataclass__repr__default_fn(self.parameters)) is not None:
|
|
1854
|
-
parts.append(f"parameters={s}")
|
|
2351
|
+
parts.append(f"function={self.function!r}")
|
|
1855
2352
|
return (
|
|
1856
2353
|
f"{self.__class__.__qualname__}("
|
|
1857
2354
|
f"{', '.join(parts)}"
|
|
@@ -1868,453 +2365,32 @@ def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
|
1868
2365
|
|
|
1869
2366
|
@_register(
|
|
1870
2367
|
plan_repr=(
|
|
1871
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
1872
|
-
"
|
|
1873
|
-
",
|
|
1874
|
-
"
|
|
1875
|
-
"
|
|
1876
|
-
",
|
|
1877
|
-
"
|
|
1878
|
-
"
|
|
1879
|
-
"
|
|
1880
|
-
"
|
|
1881
|
-
"False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='creat"
|
|
1882
|
-
"ed_at', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), defaul"
|
|
1883
|
-
"t_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_ty"
|
|
1884
|
-
"pe=None), InitPlan.Field(name='done', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='i"
|
|
1885
|
-
"nit.fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce"
|
|
1886
|
-
"=None, validate=None, check_type=None), InitPlan.Field(name='done_reason', annotation=OpRef(name='init.fields."
|
|
1887
|
-
"3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True, override=False, "
|
|
1888
|
-
"field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='total_durati"
|
|
1889
|
-
"on', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_f"
|
|
1890
|
-
"actory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type="
|
|
1891
|
-
"None), InitPlan.Field(name='load_duration', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(n"
|
|
1892
|
-
"ame='init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, "
|
|
1893
|
-
"coerce=None, validate=None, check_type=None), InitPlan.Field(name='prompt_eval_count', annotation=OpRef(name='"
|
|
1894
|
-
"init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), default_factory=None, init=True, over"
|
|
1895
|
-
"ride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='"
|
|
1896
|
-
"prompt_eval_duration', annotation=OpRef(name='init.fields.7.annotation'), default=OpRef(name='init.fields.7.de"
|
|
1897
|
-
"fault'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate"
|
|
1898
|
-
"=None, check_type=None), InitPlan.Field(name='eval_count', annotation=OpRef(name='init.fields.8.annotation'), "
|
|
1899
|
-
"default=OpRef(name='init.fields.8.default'), default_factory=None, init=True, override=False, field_type=Field"
|
|
1900
|
-
"Type.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='eval_duration', annotation=O"
|
|
1901
|
-
"pRef(name='init.fields.9.annotation'), default=OpRef(name='init.fields.9.default'), default_factory=None, init"
|
|
1902
|
-
"=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.F"
|
|
1903
|
-
"ield(name='response', annotation=OpRef(name='init.fields.10.annotation'), default=None, default_factory=None, "
|
|
1904
|
-
"init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPl"
|
|
1905
|
-
"an.Field(name='thinking', annotation=OpRef(name='init.fields.11.annotation'), default=OpRef(name='init.fields."
|
|
1906
|
-
"11.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, val"
|
|
1907
|
-
"idate=None, check_type=None), InitPlan.Field(name='context', annotation=OpRef(name='init.fields.12.annotation'"
|
|
1908
|
-
"), default=OpRef(name='init.fields.12.default'), default_factory=None, init=True, override=False, field_type=F"
|
|
1909
|
-
"ieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_pa"
|
|
1910
|
-
"rams=('model', 'created_at', 'done', 'done_reason', 'total_duration', 'load_duration', 'prompt_eval_count', 'p"
|
|
1911
|
-
"rompt_eval_duration', 'eval_count', 'eval_duration', 'response', 'thinking', 'context'), frozen=True, slots=Fa"
|
|
1912
|
-
"lse, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model', kw_on"
|
|
1913
|
-
"ly=True, fn=None), ReprPlan.Field(name='created_at', kw_only=True, fn=None), ReprPlan.Field(name='done', kw_on"
|
|
1914
|
-
"ly=True, fn=None), ReprPlan.Field(name='done_reason', kw_only=True, fn=None), ReprPlan.Field(name='total_durat"
|
|
1915
|
-
"ion', kw_only=True, fn=None), ReprPlan.Field(name='load_duration', kw_only=True, fn=None), ReprPlan.Field(name"
|
|
1916
|
-
"='prompt_eval_count', kw_only=True, fn=None), ReprPlan.Field(name='prompt_eval_duration', kw_only=True, fn=Non"
|
|
1917
|
-
"e), ReprPlan.Field(name='eval_count', kw_only=True, fn=None), ReprPlan.Field(name='eval_duration', kw_only=Tru"
|
|
1918
|
-
"e, fn=None), ReprPlan.Field(name='response', kw_only=True, fn=None), ReprPlan.Field(name='thinking', kw_only=T"
|
|
1919
|
-
"rue, fn=None), ReprPlan.Field(name='context', kw_only=True, fn=None)), id=False, terse=False, default_fn=OpRef"
|
|
1920
|
-
"(name='repr.default_fn'))))"
|
|
1921
|
-
),
|
|
1922
|
-
plan_repr_sha1='d4de027591ccf1da84a98a2734b94a36c6340c4b',
|
|
1923
|
-
op_ref_idents=(
|
|
1924
|
-
'__dataclass__init__fields__0__annotation',
|
|
1925
|
-
'__dataclass__init__fields__0__default',
|
|
1926
|
-
'__dataclass__init__fields__10__annotation',
|
|
1927
|
-
'__dataclass__init__fields__11__annotation',
|
|
1928
|
-
'__dataclass__init__fields__11__default',
|
|
1929
|
-
'__dataclass__init__fields__12__annotation',
|
|
1930
|
-
'__dataclass__init__fields__12__default',
|
|
1931
|
-
'__dataclass__init__fields__1__annotation',
|
|
1932
|
-
'__dataclass__init__fields__1__default',
|
|
1933
|
-
'__dataclass__init__fields__2__annotation',
|
|
1934
|
-
'__dataclass__init__fields__2__default',
|
|
1935
|
-
'__dataclass__init__fields__3__annotation',
|
|
1936
|
-
'__dataclass__init__fields__3__default',
|
|
1937
|
-
'__dataclass__init__fields__4__annotation',
|
|
1938
|
-
'__dataclass__init__fields__4__default',
|
|
1939
|
-
'__dataclass__init__fields__5__annotation',
|
|
1940
|
-
'__dataclass__init__fields__5__default',
|
|
1941
|
-
'__dataclass__init__fields__6__annotation',
|
|
1942
|
-
'__dataclass__init__fields__6__default',
|
|
1943
|
-
'__dataclass__init__fields__7__annotation',
|
|
1944
|
-
'__dataclass__init__fields__7__default',
|
|
1945
|
-
'__dataclass__init__fields__8__annotation',
|
|
1946
|
-
'__dataclass__init__fields__8__default',
|
|
1947
|
-
'__dataclass__init__fields__9__annotation',
|
|
1948
|
-
'__dataclass__init__fields__9__default',
|
|
1949
|
-
'__dataclass__repr__default_fn',
|
|
1950
|
-
),
|
|
1951
|
-
cls_names=(
|
|
1952
|
-
('ommlds.backends.ollama.protocol', 'GenerateResponse'),
|
|
1953
|
-
),
|
|
1954
|
-
)
|
|
1955
|
-
def _process_dataclass__d4de027591ccf1da84a98a2734b94a36c6340c4b():
|
|
1956
|
-
def _process_dataclass(
|
|
1957
|
-
*,
|
|
1958
|
-
__dataclass__cls,
|
|
1959
|
-
__dataclass__init__fields__0__annotation,
|
|
1960
|
-
__dataclass__init__fields__0__default,
|
|
1961
|
-
__dataclass__init__fields__10__annotation,
|
|
1962
|
-
__dataclass__init__fields__11__annotation,
|
|
1963
|
-
__dataclass__init__fields__11__default,
|
|
1964
|
-
__dataclass__init__fields__12__annotation,
|
|
1965
|
-
__dataclass__init__fields__12__default,
|
|
1966
|
-
__dataclass__init__fields__1__annotation,
|
|
1967
|
-
__dataclass__init__fields__1__default,
|
|
1968
|
-
__dataclass__init__fields__2__annotation,
|
|
1969
|
-
__dataclass__init__fields__2__default,
|
|
1970
|
-
__dataclass__init__fields__3__annotation,
|
|
1971
|
-
__dataclass__init__fields__3__default,
|
|
1972
|
-
__dataclass__init__fields__4__annotation,
|
|
1973
|
-
__dataclass__init__fields__4__default,
|
|
1974
|
-
__dataclass__init__fields__5__annotation,
|
|
1975
|
-
__dataclass__init__fields__5__default,
|
|
1976
|
-
__dataclass__init__fields__6__annotation,
|
|
1977
|
-
__dataclass__init__fields__6__default,
|
|
1978
|
-
__dataclass__init__fields__7__annotation,
|
|
1979
|
-
__dataclass__init__fields__7__default,
|
|
1980
|
-
__dataclass__init__fields__8__annotation,
|
|
1981
|
-
__dataclass__init__fields__8__default,
|
|
1982
|
-
__dataclass__init__fields__9__annotation,
|
|
1983
|
-
__dataclass__init__fields__9__default,
|
|
1984
|
-
__dataclass__repr__default_fn,
|
|
1985
|
-
__dataclass__FieldFnValidationError, # noqa
|
|
1986
|
-
__dataclass__FieldTypeValidationError, # noqa
|
|
1987
|
-
__dataclass__FnValidationError, # noqa
|
|
1988
|
-
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1989
|
-
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1990
|
-
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1991
|
-
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1992
|
-
__dataclass__None=None, # noqa
|
|
1993
|
-
__dataclass__TypeError=TypeError, # noqa
|
|
1994
|
-
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1995
|
-
__dataclass__isinstance=isinstance, # noqa
|
|
1996
|
-
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1997
|
-
__dataclass__property=property, # noqa
|
|
1998
|
-
):
|
|
1999
|
-
def __copy__(self):
|
|
2000
|
-
if self.__class__ is not __dataclass__cls:
|
|
2001
|
-
raise TypeError(self)
|
|
2002
|
-
return __dataclass__cls( # noqa
|
|
2003
|
-
model=self.model,
|
|
2004
|
-
created_at=self.created_at,
|
|
2005
|
-
done=self.done,
|
|
2006
|
-
done_reason=self.done_reason,
|
|
2007
|
-
total_duration=self.total_duration,
|
|
2008
|
-
load_duration=self.load_duration,
|
|
2009
|
-
prompt_eval_count=self.prompt_eval_count,
|
|
2010
|
-
prompt_eval_duration=self.prompt_eval_duration,
|
|
2011
|
-
eval_count=self.eval_count,
|
|
2012
|
-
eval_duration=self.eval_duration,
|
|
2013
|
-
response=self.response,
|
|
2014
|
-
thinking=self.thinking,
|
|
2015
|
-
context=self.context,
|
|
2016
|
-
)
|
|
2017
|
-
|
|
2018
|
-
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2019
|
-
if '__copy__' in __dataclass__cls.__dict__:
|
|
2020
|
-
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2021
|
-
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2022
|
-
|
|
2023
|
-
def __eq__(self, other):
|
|
2024
|
-
if self is other:
|
|
2025
|
-
return True
|
|
2026
|
-
if self.__class__ is not other.__class__:
|
|
2027
|
-
return NotImplemented
|
|
2028
|
-
return (
|
|
2029
|
-
self.model == other.model and
|
|
2030
|
-
self.created_at == other.created_at and
|
|
2031
|
-
self.done == other.done and
|
|
2032
|
-
self.done_reason == other.done_reason and
|
|
2033
|
-
self.total_duration == other.total_duration and
|
|
2034
|
-
self.load_duration == other.load_duration and
|
|
2035
|
-
self.prompt_eval_count == other.prompt_eval_count and
|
|
2036
|
-
self.prompt_eval_duration == other.prompt_eval_duration and
|
|
2037
|
-
self.eval_count == other.eval_count and
|
|
2038
|
-
self.eval_duration == other.eval_duration and
|
|
2039
|
-
self.response == other.response and
|
|
2040
|
-
self.thinking == other.thinking and
|
|
2041
|
-
self.context == other.context
|
|
2042
|
-
)
|
|
2043
|
-
|
|
2044
|
-
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2045
|
-
if '__eq__' in __dataclass__cls.__dict__:
|
|
2046
|
-
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2047
|
-
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2048
|
-
|
|
2049
|
-
__dataclass___setattr_frozen_fields = {
|
|
2050
|
-
'model',
|
|
2051
|
-
'created_at',
|
|
2052
|
-
'done',
|
|
2053
|
-
'done_reason',
|
|
2054
|
-
'total_duration',
|
|
2055
|
-
'load_duration',
|
|
2056
|
-
'prompt_eval_count',
|
|
2057
|
-
'prompt_eval_duration',
|
|
2058
|
-
'eval_count',
|
|
2059
|
-
'eval_duration',
|
|
2060
|
-
'response',
|
|
2061
|
-
'thinking',
|
|
2062
|
-
'context',
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
def __setattr__(self, name, value):
|
|
2066
|
-
if (
|
|
2067
|
-
type(self) is __dataclass__cls
|
|
2068
|
-
or name in __dataclass___setattr_frozen_fields
|
|
2069
|
-
):
|
|
2070
|
-
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2071
|
-
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2072
|
-
|
|
2073
|
-
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2074
|
-
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2075
|
-
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2076
|
-
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2077
|
-
|
|
2078
|
-
__dataclass___delattr_frozen_fields = {
|
|
2079
|
-
'model',
|
|
2080
|
-
'created_at',
|
|
2081
|
-
'done',
|
|
2082
|
-
'done_reason',
|
|
2083
|
-
'total_duration',
|
|
2084
|
-
'load_duration',
|
|
2085
|
-
'prompt_eval_count',
|
|
2086
|
-
'prompt_eval_duration',
|
|
2087
|
-
'eval_count',
|
|
2088
|
-
'eval_duration',
|
|
2089
|
-
'response',
|
|
2090
|
-
'thinking',
|
|
2091
|
-
'context',
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
def __delattr__(self, name):
|
|
2095
|
-
if (
|
|
2096
|
-
type(self) is __dataclass__cls
|
|
2097
|
-
or name in __dataclass___delattr_frozen_fields
|
|
2098
|
-
):
|
|
2099
|
-
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2100
|
-
super(__dataclass__cls, self).__delattr__(name)
|
|
2101
|
-
|
|
2102
|
-
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2103
|
-
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2104
|
-
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2105
|
-
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2106
|
-
|
|
2107
|
-
def __hash__(self):
|
|
2108
|
-
return hash((
|
|
2109
|
-
self.model,
|
|
2110
|
-
self.created_at,
|
|
2111
|
-
self.done,
|
|
2112
|
-
self.done_reason,
|
|
2113
|
-
self.total_duration,
|
|
2114
|
-
self.load_duration,
|
|
2115
|
-
self.prompt_eval_count,
|
|
2116
|
-
self.prompt_eval_duration,
|
|
2117
|
-
self.eval_count,
|
|
2118
|
-
self.eval_duration,
|
|
2119
|
-
self.response,
|
|
2120
|
-
self.thinking,
|
|
2121
|
-
self.context,
|
|
2122
|
-
))
|
|
2123
|
-
|
|
2124
|
-
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2125
|
-
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2126
|
-
|
|
2127
|
-
def __init__(
|
|
2128
|
-
self,
|
|
2129
|
-
*,
|
|
2130
|
-
model: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
2131
|
-
created_at: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
2132
|
-
done: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
2133
|
-
done_reason: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
2134
|
-
total_duration: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
2135
|
-
load_duration: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
2136
|
-
prompt_eval_count: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
2137
|
-
prompt_eval_duration: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
2138
|
-
eval_count: __dataclass__init__fields__8__annotation = __dataclass__init__fields__8__default,
|
|
2139
|
-
eval_duration: __dataclass__init__fields__9__annotation = __dataclass__init__fields__9__default,
|
|
2140
|
-
response: __dataclass__init__fields__10__annotation,
|
|
2141
|
-
thinking: __dataclass__init__fields__11__annotation = __dataclass__init__fields__11__default,
|
|
2142
|
-
context: __dataclass__init__fields__12__annotation = __dataclass__init__fields__12__default,
|
|
2143
|
-
) -> __dataclass__None:
|
|
2144
|
-
__dataclass__object_setattr(self, 'model', model)
|
|
2145
|
-
__dataclass__object_setattr(self, 'created_at', created_at)
|
|
2146
|
-
__dataclass__object_setattr(self, 'done', done)
|
|
2147
|
-
__dataclass__object_setattr(self, 'done_reason', done_reason)
|
|
2148
|
-
__dataclass__object_setattr(self, 'total_duration', total_duration)
|
|
2149
|
-
__dataclass__object_setattr(self, 'load_duration', load_duration)
|
|
2150
|
-
__dataclass__object_setattr(self, 'prompt_eval_count', prompt_eval_count)
|
|
2151
|
-
__dataclass__object_setattr(self, 'prompt_eval_duration', prompt_eval_duration)
|
|
2152
|
-
__dataclass__object_setattr(self, 'eval_count', eval_count)
|
|
2153
|
-
__dataclass__object_setattr(self, 'eval_duration', eval_duration)
|
|
2154
|
-
__dataclass__object_setattr(self, 'response', response)
|
|
2155
|
-
__dataclass__object_setattr(self, 'thinking', thinking)
|
|
2156
|
-
__dataclass__object_setattr(self, 'context', context)
|
|
2157
|
-
|
|
2158
|
-
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2159
|
-
if '__init__' in __dataclass__cls.__dict__:
|
|
2160
|
-
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2161
|
-
setattr(__dataclass__cls, '__init__', __init__)
|
|
2162
|
-
|
|
2163
|
-
@__dataclass___recursive_repr()
|
|
2164
|
-
def __repr__(self):
|
|
2165
|
-
parts = []
|
|
2166
|
-
if (s := __dataclass__repr__default_fn(self.model)) is not None:
|
|
2167
|
-
parts.append(f"model={s}")
|
|
2168
|
-
if (s := __dataclass__repr__default_fn(self.created_at)) is not None:
|
|
2169
|
-
parts.append(f"created_at={s}")
|
|
2170
|
-
if (s := __dataclass__repr__default_fn(self.done)) is not None:
|
|
2171
|
-
parts.append(f"done={s}")
|
|
2172
|
-
if (s := __dataclass__repr__default_fn(self.done_reason)) is not None:
|
|
2173
|
-
parts.append(f"done_reason={s}")
|
|
2174
|
-
if (s := __dataclass__repr__default_fn(self.total_duration)) is not None:
|
|
2175
|
-
parts.append(f"total_duration={s}")
|
|
2176
|
-
if (s := __dataclass__repr__default_fn(self.load_duration)) is not None:
|
|
2177
|
-
parts.append(f"load_duration={s}")
|
|
2178
|
-
if (s := __dataclass__repr__default_fn(self.prompt_eval_count)) is not None:
|
|
2179
|
-
parts.append(f"prompt_eval_count={s}")
|
|
2180
|
-
if (s := __dataclass__repr__default_fn(self.prompt_eval_duration)) is not None:
|
|
2181
|
-
parts.append(f"prompt_eval_duration={s}")
|
|
2182
|
-
if (s := __dataclass__repr__default_fn(self.eval_count)) is not None:
|
|
2183
|
-
parts.append(f"eval_count={s}")
|
|
2184
|
-
if (s := __dataclass__repr__default_fn(self.eval_duration)) is not None:
|
|
2185
|
-
parts.append(f"eval_duration={s}")
|
|
2186
|
-
if (s := __dataclass__repr__default_fn(self.response)) is not None:
|
|
2187
|
-
parts.append(f"response={s}")
|
|
2188
|
-
if (s := __dataclass__repr__default_fn(self.thinking)) is not None:
|
|
2189
|
-
parts.append(f"thinking={s}")
|
|
2190
|
-
if (s := __dataclass__repr__default_fn(self.context)) is not None:
|
|
2191
|
-
parts.append(f"context={s}")
|
|
2192
|
-
return (
|
|
2193
|
-
f"{self.__class__.__qualname__}("
|
|
2194
|
-
f"{', '.join(parts)}"
|
|
2195
|
-
f")"
|
|
2196
|
-
)
|
|
2197
|
-
|
|
2198
|
-
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2199
|
-
if '__repr__' in __dataclass__cls.__dict__:
|
|
2200
|
-
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2201
|
-
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2202
|
-
|
|
2203
|
-
return _process_dataclass
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
@_register(
|
|
2207
|
-
plan_repr=(
|
|
2208
|
-
"Plans(tup=(CopyPlan(fields=('model', 'stream', 'options', 'format', 'keep_alive', 'prompt', 'suffix', 'system'"
|
|
2209
|
-
", 'template', 'context', 'raw', 'images', 'think')), EqPlan(fields=('model', 'stream', 'options', 'format', 'k"
|
|
2210
|
-
"eep_alive', 'prompt', 'suffix', 'system', 'template', 'context', 'raw', 'images', 'think')), FrozenPlan(fields"
|
|
2211
|
-
"=('model', 'stream', 'options', 'format', 'keep_alive', 'prompt', 'suffix', 'system', 'template', 'context', '"
|
|
2212
|
-
"raw', 'images', 'think'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('model', 'stream',"
|
|
2213
|
-
" 'options', 'format', 'keep_alive', 'prompt', 'suffix', 'system', 'template', 'context', 'raw', 'images', 'thi"
|
|
2214
|
-
"nk'), cache=False), InitPlan(fields=(InitPlan.Field(name='model', annotation=OpRef(name='init.fields.0.annotat"
|
|
2215
|
-
"ion'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=No"
|
|
2216
|
-
"ne, validate=None, check_type=None), InitPlan.Field(name='stream', annotation=OpRef(name='init.fields.1.annota"
|
|
2217
|
-
"tion'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_ty"
|
|
2218
|
-
"pe=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='options', annotation"
|
|
2219
|
-
"=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_factory=None, in"
|
|
2220
|
-
"it=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan"
|
|
2221
|
-
".Field(name='format', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.def"
|
|
2222
|
-
"ault'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate="
|
|
2223
|
-
"None, check_type=None), InitPlan.Field(name='keep_alive', annotation=OpRef(name='init.fields.4.annotation'), d"
|
|
2224
|
-
"efault=OpRef(name='init.fields.4.default'), default_factory=None, init=True, override=False, field_type=FieldT"
|
|
2225
|
-
"ype.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='prompt', annotation=OpRef(nam"
|
|
2226
|
-
"e='init.fields.5.annotation'), default=OpRef(name='init.fields.5.default'), default_factory=None, init=True, o"
|
|
2227
|
-
"verride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(nam"
|
|
2228
|
-
"e='suffix', annotation=OpRef(name='init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), de"
|
|
2229
|
-
"fault_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, chec"
|
|
2230
|
-
"k_type=None), InitPlan.Field(name='system', annotation=OpRef(name='init.fields.7.annotation'), default=OpRef(n"
|
|
2231
|
-
"ame='init.fields.7.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, "
|
|
2232
|
-
"coerce=None, validate=None, check_type=None), InitPlan.Field(name='template', annotation=OpRef(name='init.fiel"
|
|
2233
|
-
"ds.8.annotation'), default=OpRef(name='init.fields.8.default'), default_factory=None, init=True, override=Fals"
|
|
2234
|
-
"e, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='context',"
|
|
2235
|
-
" annotation=OpRef(name='init.fields.9.annotation'), default=OpRef(name='init.fields.9.default'), default_facto"
|
|
2236
|
-
"ry=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None"
|
|
2237
|
-
"), InitPlan.Field(name='raw', annotation=OpRef(name='init.fields.10.annotation'), default=OpRef(name='init.fie"
|
|
2238
|
-
"lds.10.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None,"
|
|
2239
|
-
" validate=None, check_type=None), InitPlan.Field(name='images', annotation=OpRef(name='init.fields.11.annotati"
|
|
2240
|
-
"on'), default=OpRef(name='init.fields.11.default'), default_factory=None, init=True, override=False, field_typ"
|
|
2241
|
-
"e=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='think', annotation=Op"
|
|
2242
|
-
"Ref(name='init.fields.12.annotation'), default=OpRef(name='init.fields.12.default'), default_factory=None, ini"
|
|
2243
|
-
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_par"
|
|
2244
|
-
"am='self', std_params=(), kw_only_params=('model', 'stream', 'options', 'format', 'keep_alive', 'prompt', 'suf"
|
|
2245
|
-
"fix', 'system', 'template', 'context', 'raw', 'images', 'think'), frozen=True, slots=False, post_init_params=N"
|
|
2246
|
-
"one, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model', kw_only=True, fn=None), Repr"
|
|
2247
|
-
"Plan.Field(name='stream', kw_only=True, fn=None), ReprPlan.Field(name='options', kw_only=True, fn=None), ReprP"
|
|
2248
|
-
"lan.Field(name='format', kw_only=True, fn=None), ReprPlan.Field(name='keep_alive', kw_only=True, fn=None), Rep"
|
|
2249
|
-
"rPlan.Field(name='prompt', kw_only=True, fn=None), ReprPlan.Field(name='suffix', kw_only=True, fn=None), ReprP"
|
|
2250
|
-
"lan.Field(name='system', kw_only=True, fn=None), ReprPlan.Field(name='template', kw_only=True, fn=None), ReprP"
|
|
2251
|
-
"lan.Field(name='context', kw_only=True, fn=None), ReprPlan.Field(name='raw', kw_only=True, fn=None), ReprPlan."
|
|
2252
|
-
"Field(name='images', kw_only=True, fn=None), ReprPlan.Field(name='think', kw_only=True, fn=None)), id=False, t"
|
|
2253
|
-
"erse=False, default_fn=OpRef(name='repr.default_fn'))))"
|
|
2368
|
+
"Plans(tup=(CopyPlan(fields=('name', 'arguments')), EqPlan(fields=('name', 'arguments')), FrozenPlan(fields=('n"
|
|
2369
|
+
"ame', 'arguments'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('name', 'arguments'), ca"
|
|
2370
|
+
"che=False), InitPlan(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), de"
|
|
2371
|
+
"fault=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, valid"
|
|
2372
|
+
"ate=None, check_type=None), InitPlan.Field(name='arguments', annotation=OpRef(name='init.fields.1.annotation')"
|
|
2373
|
+
", default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, v"
|
|
2374
|
+
"alidate=None, check_type=None)), self_param='self', std_params=(), kw_only_params=('name', 'arguments'), froze"
|
|
2375
|
+
"n=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(nam"
|
|
2376
|
+
"e='name', kw_only=True, fn=None), ReprPlan.Field(name='arguments', kw_only=True, fn=None)), id=False, terse=Fa"
|
|
2377
|
+
"lse, default_fn=None)))"
|
|
2254
2378
|
),
|
|
2255
|
-
plan_repr_sha1='
|
|
2379
|
+
plan_repr_sha1='117a4dfaa89634a6031af8480bfa22336edf606d',
|
|
2256
2380
|
op_ref_idents=(
|
|
2257
2381
|
'__dataclass__init__fields__0__annotation',
|
|
2258
|
-
'__dataclass__init__fields__10__annotation',
|
|
2259
|
-
'__dataclass__init__fields__10__default',
|
|
2260
|
-
'__dataclass__init__fields__11__annotation',
|
|
2261
|
-
'__dataclass__init__fields__11__default',
|
|
2262
|
-
'__dataclass__init__fields__12__annotation',
|
|
2263
|
-
'__dataclass__init__fields__12__default',
|
|
2264
2382
|
'__dataclass__init__fields__1__annotation',
|
|
2265
|
-
'__dataclass__init__fields__1__default',
|
|
2266
|
-
'__dataclass__init__fields__2__annotation',
|
|
2267
|
-
'__dataclass__init__fields__2__default',
|
|
2268
|
-
'__dataclass__init__fields__3__annotation',
|
|
2269
|
-
'__dataclass__init__fields__3__default',
|
|
2270
|
-
'__dataclass__init__fields__4__annotation',
|
|
2271
|
-
'__dataclass__init__fields__4__default',
|
|
2272
|
-
'__dataclass__init__fields__5__annotation',
|
|
2273
|
-
'__dataclass__init__fields__5__default',
|
|
2274
|
-
'__dataclass__init__fields__6__annotation',
|
|
2275
|
-
'__dataclass__init__fields__6__default',
|
|
2276
|
-
'__dataclass__init__fields__7__annotation',
|
|
2277
|
-
'__dataclass__init__fields__7__default',
|
|
2278
|
-
'__dataclass__init__fields__8__annotation',
|
|
2279
|
-
'__dataclass__init__fields__8__default',
|
|
2280
|
-
'__dataclass__init__fields__9__annotation',
|
|
2281
|
-
'__dataclass__init__fields__9__default',
|
|
2282
|
-
'__dataclass__repr__default_fn',
|
|
2283
2383
|
),
|
|
2284
2384
|
cls_names=(
|
|
2285
|
-
('ommlds.backends.ollama.protocol', '
|
|
2385
|
+
('ommlds.backends.ollama.protocol', 'Message.ToolCall.Function'),
|
|
2286
2386
|
),
|
|
2287
2387
|
)
|
|
2288
|
-
def
|
|
2388
|
+
def _process_dataclass__117a4dfaa89634a6031af8480bfa22336edf606d():
|
|
2289
2389
|
def _process_dataclass(
|
|
2290
|
-
*,
|
|
2291
|
-
__dataclass__cls,
|
|
2292
|
-
__dataclass__init__fields__0__annotation,
|
|
2293
|
-
|
|
2294
|
-
__dataclass__init__fields__10__default,
|
|
2295
|
-
__dataclass__init__fields__11__annotation,
|
|
2296
|
-
__dataclass__init__fields__11__default,
|
|
2297
|
-
__dataclass__init__fields__12__annotation,
|
|
2298
|
-
__dataclass__init__fields__12__default,
|
|
2299
|
-
__dataclass__init__fields__1__annotation,
|
|
2300
|
-
__dataclass__init__fields__1__default,
|
|
2301
|
-
__dataclass__init__fields__2__annotation,
|
|
2302
|
-
__dataclass__init__fields__2__default,
|
|
2303
|
-
__dataclass__init__fields__3__annotation,
|
|
2304
|
-
__dataclass__init__fields__3__default,
|
|
2305
|
-
__dataclass__init__fields__4__annotation,
|
|
2306
|
-
__dataclass__init__fields__4__default,
|
|
2307
|
-
__dataclass__init__fields__5__annotation,
|
|
2308
|
-
__dataclass__init__fields__5__default,
|
|
2309
|
-
__dataclass__init__fields__6__annotation,
|
|
2310
|
-
__dataclass__init__fields__6__default,
|
|
2311
|
-
__dataclass__init__fields__7__annotation,
|
|
2312
|
-
__dataclass__init__fields__7__default,
|
|
2313
|
-
__dataclass__init__fields__8__annotation,
|
|
2314
|
-
__dataclass__init__fields__8__default,
|
|
2315
|
-
__dataclass__init__fields__9__annotation,
|
|
2316
|
-
__dataclass__init__fields__9__default,
|
|
2317
|
-
__dataclass__repr__default_fn,
|
|
2390
|
+
*,
|
|
2391
|
+
__dataclass__cls,
|
|
2392
|
+
__dataclass__init__fields__0__annotation,
|
|
2393
|
+
__dataclass__init__fields__1__annotation,
|
|
2318
2394
|
__dataclass__FieldFnValidationError, # noqa
|
|
2319
2395
|
__dataclass__FieldTypeValidationError, # noqa
|
|
2320
2396
|
__dataclass__FnValidationError, # noqa
|
|
@@ -2333,19 +2409,8 @@ def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
|
2333
2409
|
if self.__class__ is not __dataclass__cls:
|
|
2334
2410
|
raise TypeError(self)
|
|
2335
2411
|
return __dataclass__cls( # noqa
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
options=self.options,
|
|
2339
|
-
format=self.format,
|
|
2340
|
-
keep_alive=self.keep_alive,
|
|
2341
|
-
prompt=self.prompt,
|
|
2342
|
-
suffix=self.suffix,
|
|
2343
|
-
system=self.system,
|
|
2344
|
-
template=self.template,
|
|
2345
|
-
context=self.context,
|
|
2346
|
-
raw=self.raw,
|
|
2347
|
-
images=self.images,
|
|
2348
|
-
think=self.think,
|
|
2412
|
+
name=self.name,
|
|
2413
|
+
arguments=self.arguments,
|
|
2349
2414
|
)
|
|
2350
2415
|
|
|
2351
2416
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -2359,19 +2424,8 @@ def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
|
2359
2424
|
if self.__class__ is not other.__class__:
|
|
2360
2425
|
return NotImplemented
|
|
2361
2426
|
return (
|
|
2362
|
-
self.
|
|
2363
|
-
self.
|
|
2364
|
-
self.options == other.options and
|
|
2365
|
-
self.format == other.format and
|
|
2366
|
-
self.keep_alive == other.keep_alive and
|
|
2367
|
-
self.prompt == other.prompt and
|
|
2368
|
-
self.suffix == other.suffix and
|
|
2369
|
-
self.system == other.system and
|
|
2370
|
-
self.template == other.template and
|
|
2371
|
-
self.context == other.context and
|
|
2372
|
-
self.raw == other.raw and
|
|
2373
|
-
self.images == other.images and
|
|
2374
|
-
self.think == other.think
|
|
2427
|
+
self.name == other.name and
|
|
2428
|
+
self.arguments == other.arguments
|
|
2375
2429
|
)
|
|
2376
2430
|
|
|
2377
2431
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -2380,19 +2434,8 @@ def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
|
2380
2434
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2381
2435
|
|
|
2382
2436
|
__dataclass___setattr_frozen_fields = {
|
|
2383
|
-
'
|
|
2384
|
-
'
|
|
2385
|
-
'options',
|
|
2386
|
-
'format',
|
|
2387
|
-
'keep_alive',
|
|
2388
|
-
'prompt',
|
|
2389
|
-
'suffix',
|
|
2390
|
-
'system',
|
|
2391
|
-
'template',
|
|
2392
|
-
'context',
|
|
2393
|
-
'raw',
|
|
2394
|
-
'images',
|
|
2395
|
-
'think',
|
|
2437
|
+
'name',
|
|
2438
|
+
'arguments',
|
|
2396
2439
|
}
|
|
2397
2440
|
|
|
2398
2441
|
def __setattr__(self, name, value):
|
|
@@ -2409,19 +2452,8 @@ def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
|
2409
2452
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2410
2453
|
|
|
2411
2454
|
__dataclass___delattr_frozen_fields = {
|
|
2412
|
-
'
|
|
2413
|
-
'
|
|
2414
|
-
'options',
|
|
2415
|
-
'format',
|
|
2416
|
-
'keep_alive',
|
|
2417
|
-
'prompt',
|
|
2418
|
-
'suffix',
|
|
2419
|
-
'system',
|
|
2420
|
-
'template',
|
|
2421
|
-
'context',
|
|
2422
|
-
'raw',
|
|
2423
|
-
'images',
|
|
2424
|
-
'think',
|
|
2455
|
+
'name',
|
|
2456
|
+
'arguments',
|
|
2425
2457
|
}
|
|
2426
2458
|
|
|
2427
2459
|
def __delattr__(self, name):
|
|
@@ -2439,19 +2471,8 @@ def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
|
2439
2471
|
|
|
2440
2472
|
def __hash__(self):
|
|
2441
2473
|
return hash((
|
|
2442
|
-
self.
|
|
2443
|
-
self.
|
|
2444
|
-
self.options,
|
|
2445
|
-
self.format,
|
|
2446
|
-
self.keep_alive,
|
|
2447
|
-
self.prompt,
|
|
2448
|
-
self.suffix,
|
|
2449
|
-
self.system,
|
|
2450
|
-
self.template,
|
|
2451
|
-
self.context,
|
|
2452
|
-
self.raw,
|
|
2453
|
-
self.images,
|
|
2454
|
-
self.think,
|
|
2474
|
+
self.name,
|
|
2475
|
+
self.arguments,
|
|
2455
2476
|
))
|
|
2456
2477
|
|
|
2457
2478
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -2460,33 +2481,11 @@ def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
|
2460
2481
|
def __init__(
|
|
2461
2482
|
self,
|
|
2462
2483
|
*,
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
options: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
2466
|
-
format: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
2467
|
-
keep_alive: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
2468
|
-
prompt: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
2469
|
-
suffix: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
2470
|
-
system: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
2471
|
-
template: __dataclass__init__fields__8__annotation = __dataclass__init__fields__8__default,
|
|
2472
|
-
context: __dataclass__init__fields__9__annotation = __dataclass__init__fields__9__default,
|
|
2473
|
-
raw: __dataclass__init__fields__10__annotation = __dataclass__init__fields__10__default,
|
|
2474
|
-
images: __dataclass__init__fields__11__annotation = __dataclass__init__fields__11__default,
|
|
2475
|
-
think: __dataclass__init__fields__12__annotation = __dataclass__init__fields__12__default,
|
|
2484
|
+
name: __dataclass__init__fields__0__annotation,
|
|
2485
|
+
arguments: __dataclass__init__fields__1__annotation,
|
|
2476
2486
|
) -> __dataclass__None:
|
|
2477
|
-
__dataclass__object_setattr(self, '
|
|
2478
|
-
__dataclass__object_setattr(self, '
|
|
2479
|
-
__dataclass__object_setattr(self, 'options', options)
|
|
2480
|
-
__dataclass__object_setattr(self, 'format', format)
|
|
2481
|
-
__dataclass__object_setattr(self, 'keep_alive', keep_alive)
|
|
2482
|
-
__dataclass__object_setattr(self, 'prompt', prompt)
|
|
2483
|
-
__dataclass__object_setattr(self, 'suffix', suffix)
|
|
2484
|
-
__dataclass__object_setattr(self, 'system', system)
|
|
2485
|
-
__dataclass__object_setattr(self, 'template', template)
|
|
2486
|
-
__dataclass__object_setattr(self, 'context', context)
|
|
2487
|
-
__dataclass__object_setattr(self, 'raw', raw)
|
|
2488
|
-
__dataclass__object_setattr(self, 'images', images)
|
|
2489
|
-
__dataclass__object_setattr(self, 'think', think)
|
|
2487
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
2488
|
+
__dataclass__object_setattr(self, 'arguments', arguments)
|
|
2490
2489
|
|
|
2491
2490
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2492
2491
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -2496,32 +2495,8 @@ def _process_dataclass__e8b909b51aff3e1fd8203ee672cfc0bab5067233():
|
|
|
2496
2495
|
@__dataclass___recursive_repr()
|
|
2497
2496
|
def __repr__(self):
|
|
2498
2497
|
parts = []
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
if (s := __dataclass__repr__default_fn(self.stream)) is not None:
|
|
2502
|
-
parts.append(f"stream={s}")
|
|
2503
|
-
if (s := __dataclass__repr__default_fn(self.options)) is not None:
|
|
2504
|
-
parts.append(f"options={s}")
|
|
2505
|
-
if (s := __dataclass__repr__default_fn(self.format)) is not None:
|
|
2506
|
-
parts.append(f"format={s}")
|
|
2507
|
-
if (s := __dataclass__repr__default_fn(self.keep_alive)) is not None:
|
|
2508
|
-
parts.append(f"keep_alive={s}")
|
|
2509
|
-
if (s := __dataclass__repr__default_fn(self.prompt)) is not None:
|
|
2510
|
-
parts.append(f"prompt={s}")
|
|
2511
|
-
if (s := __dataclass__repr__default_fn(self.suffix)) is not None:
|
|
2512
|
-
parts.append(f"suffix={s}")
|
|
2513
|
-
if (s := __dataclass__repr__default_fn(self.system)) is not None:
|
|
2514
|
-
parts.append(f"system={s}")
|
|
2515
|
-
if (s := __dataclass__repr__default_fn(self.template)) is not None:
|
|
2516
|
-
parts.append(f"template={s}")
|
|
2517
|
-
if (s := __dataclass__repr__default_fn(self.context)) is not None:
|
|
2518
|
-
parts.append(f"context={s}")
|
|
2519
|
-
if (s := __dataclass__repr__default_fn(self.raw)) is not None:
|
|
2520
|
-
parts.append(f"raw={s}")
|
|
2521
|
-
if (s := __dataclass__repr__default_fn(self.images)) is not None:
|
|
2522
|
-
parts.append(f"images={s}")
|
|
2523
|
-
if (s := __dataclass__repr__default_fn(self.think)) is not None:
|
|
2524
|
-
parts.append(f"think={s}")
|
|
2498
|
+
parts.append(f"name={self.name!r}")
|
|
2499
|
+
parts.append(f"arguments={self.arguments!r}")
|
|
2525
2500
|
return (
|
|
2526
2501
|
f"{self.__class__.__qualname__}("
|
|
2527
2502
|
f"{', '.join(parts)}"
|
|
@@ -3156,104 +3131,201 @@ def _process_dataclass__ee676a855d03365888791d5b18db34dc1c6d5e77():
|
|
|
3156
3131
|
|
|
3157
3132
|
@_register(
|
|
3158
3133
|
plan_repr=(
|
|
3159
|
-
"Plans(tup=(CopyPlan(fields=('
|
|
3160
|
-
"
|
|
3161
|
-
", '
|
|
3162
|
-
"
|
|
3163
|
-
"
|
|
3164
|
-
"
|
|
3165
|
-
"
|
|
3166
|
-
"
|
|
3167
|
-
"
|
|
3168
|
-
"
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3134
|
+
"Plans(tup=(CopyPlan(fields=('type', 'function')), EqPlan(fields=('type', 'function')), FrozenPlan(fields=('typ"
|
|
3135
|
+
"e', 'function'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('type', 'function'), cache="
|
|
3136
|
+
"False), InitPlan(fields=(InitPlan.Field(name='type', annotation=OpRef(name='init.fields.0.annotation'), defaul"
|
|
3137
|
+
"t=OpRef(name='init.fields.0.default'), default_factory=None, init=True, override=False, field_type=FieldType.I"
|
|
3138
|
+
"NSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='function', annotation=OpRef(name='"
|
|
3139
|
+
"init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, over"
|
|
3140
|
+
"ride=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', s"
|
|
3141
|
+
"td_params=(), kw_only_params=('type', 'function'), frozen=True, slots=False, post_init_params=None, init_fns=("
|
|
3142
|
+
"), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='type', kw_only=True, fn=None), ReprPlan.Field(name="
|
|
3143
|
+
"'function', kw_only=True, fn=None)), id=False, terse=False, default_fn=OpRef(name='repr.default_fn'))))"
|
|
3144
|
+
),
|
|
3145
|
+
plan_repr_sha1='98e20371eacca6bc272118f8eb67b1dcfcf27443',
|
|
3146
|
+
op_ref_idents=(
|
|
3147
|
+
'__dataclass__init__fields__0__annotation',
|
|
3148
|
+
'__dataclass__init__fields__0__default',
|
|
3149
|
+
'__dataclass__init__fields__1__annotation',
|
|
3150
|
+
'__dataclass__init__fields__1__default',
|
|
3151
|
+
'__dataclass__repr__default_fn',
|
|
3152
|
+
),
|
|
3153
|
+
cls_names=(
|
|
3154
|
+
('ommlds.backends.ollama.protocol', 'Tool'),
|
|
3155
|
+
),
|
|
3156
|
+
)
|
|
3157
|
+
def _process_dataclass__98e20371eacca6bc272118f8eb67b1dcfcf27443():
|
|
3158
|
+
def _process_dataclass(
|
|
3159
|
+
*,
|
|
3160
|
+
__dataclass__cls,
|
|
3161
|
+
__dataclass__init__fields__0__annotation,
|
|
3162
|
+
__dataclass__init__fields__0__default,
|
|
3163
|
+
__dataclass__init__fields__1__annotation,
|
|
3164
|
+
__dataclass__init__fields__1__default,
|
|
3165
|
+
__dataclass__repr__default_fn,
|
|
3166
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
3167
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
3168
|
+
__dataclass__FnValidationError, # noqa
|
|
3169
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3170
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3171
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3172
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3173
|
+
__dataclass__None=None, # noqa
|
|
3174
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3175
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3176
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3177
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3178
|
+
__dataclass__property=property, # noqa
|
|
3179
|
+
):
|
|
3180
|
+
def __copy__(self):
|
|
3181
|
+
if self.__class__ is not __dataclass__cls:
|
|
3182
|
+
raise TypeError(self)
|
|
3183
|
+
return __dataclass__cls( # noqa
|
|
3184
|
+
type=self.type,
|
|
3185
|
+
function=self.function,
|
|
3186
|
+
)
|
|
3187
|
+
|
|
3188
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
3189
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
3190
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
3191
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
3192
|
+
|
|
3193
|
+
def __eq__(self, other):
|
|
3194
|
+
if self is other:
|
|
3195
|
+
return True
|
|
3196
|
+
if self.__class__ is not other.__class__:
|
|
3197
|
+
return NotImplemented
|
|
3198
|
+
return (
|
|
3199
|
+
self.type == other.type and
|
|
3200
|
+
self.function == other.function
|
|
3201
|
+
)
|
|
3202
|
+
|
|
3203
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
3204
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
3205
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
3206
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3207
|
+
|
|
3208
|
+
__dataclass___setattr_frozen_fields = {
|
|
3209
|
+
'type',
|
|
3210
|
+
'function',
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
def __setattr__(self, name, value):
|
|
3214
|
+
if (
|
|
3215
|
+
type(self) is __dataclass__cls
|
|
3216
|
+
or name in __dataclass___setattr_frozen_fields
|
|
3217
|
+
):
|
|
3218
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
3219
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3220
|
+
|
|
3221
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3222
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3223
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3224
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3225
|
+
|
|
3226
|
+
__dataclass___delattr_frozen_fields = {
|
|
3227
|
+
'type',
|
|
3228
|
+
'function',
|
|
3229
|
+
}
|
|
3230
|
+
|
|
3231
|
+
def __delattr__(self, name):
|
|
3232
|
+
if (
|
|
3233
|
+
type(self) is __dataclass__cls
|
|
3234
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3235
|
+
):
|
|
3236
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3237
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3238
|
+
|
|
3239
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3240
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3241
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3242
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3243
|
+
|
|
3244
|
+
def __hash__(self):
|
|
3245
|
+
return hash((
|
|
3246
|
+
self.type,
|
|
3247
|
+
self.function,
|
|
3248
|
+
))
|
|
3249
|
+
|
|
3250
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3251
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3252
|
+
|
|
3253
|
+
def __init__(
|
|
3254
|
+
self,
|
|
3255
|
+
*,
|
|
3256
|
+
type: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
3257
|
+
function: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
3258
|
+
) -> __dataclass__None:
|
|
3259
|
+
__dataclass__object_setattr(self, 'type', type)
|
|
3260
|
+
__dataclass__object_setattr(self, 'function', function)
|
|
3261
|
+
|
|
3262
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3263
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3264
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3265
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3266
|
+
|
|
3267
|
+
@__dataclass___recursive_repr()
|
|
3268
|
+
def __repr__(self):
|
|
3269
|
+
parts = []
|
|
3270
|
+
if (s := __dataclass__repr__default_fn(self.type)) is not None:
|
|
3271
|
+
parts.append(f"type={s}")
|
|
3272
|
+
if (s := __dataclass__repr__default_fn(self.function)) is not None:
|
|
3273
|
+
parts.append(f"function={s}")
|
|
3274
|
+
return (
|
|
3275
|
+
f"{self.__class__.__qualname__}("
|
|
3276
|
+
f"{', '.join(parts)}"
|
|
3277
|
+
f")"
|
|
3278
|
+
)
|
|
3279
|
+
|
|
3280
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3281
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3282
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3283
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3284
|
+
|
|
3285
|
+
return _process_dataclass
|
|
3286
|
+
|
|
3287
|
+
|
|
3288
|
+
@_register(
|
|
3289
|
+
plan_repr=(
|
|
3290
|
+
"Plans(tup=(CopyPlan(fields=('name', 'description', 'parameters')), EqPlan(fields=('name', 'description', 'para"
|
|
3291
|
+
"meters')), FrozenPlan(fields=('name', 'description', 'parameters'), allow_dynamic_dunder_attrs=False), HashPla"
|
|
3292
|
+
"n(action='add', fields=('name', 'description', 'parameters'), cache=False), InitPlan(fields=(InitPlan.Field(na"
|
|
3293
|
+
"me='name', annotation=OpRef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), def"
|
|
3294
|
+
"ault_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check"
|
|
3295
|
+
"_type=None), InitPlan.Field(name='description', annotation=OpRef(name='init.fields.1.annotation'), default=OpR"
|
|
3296
|
+
"ef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTAN"
|
|
3297
|
+
"CE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='parameters', annotation=OpRef(name='ini"
|
|
3298
|
+
"t.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, overrid"
|
|
3299
|
+
"e=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_"
|
|
3300
|
+
"params=(), kw_only_params=('name', 'description', 'parameters'), frozen=True, slots=False, post_init_params=No"
|
|
3301
|
+
"ne, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', kw_only=True, fn=None), ReprPl"
|
|
3302
|
+
"an.Field(name='description', kw_only=True, fn=None), ReprPlan.Field(name='parameters', kw_only=True, fn=None))"
|
|
3303
|
+
", id=False, terse=False, default_fn=OpRef(name='repr.default_fn'))))"
|
|
3202
3304
|
),
|
|
3203
|
-
plan_repr_sha1='
|
|
3305
|
+
plan_repr_sha1='c2256e8aae1a7cdef13cab0a48a15a27471904f0',
|
|
3204
3306
|
op_ref_idents=(
|
|
3205
3307
|
'__dataclass__init__fields__0__annotation',
|
|
3206
3308
|
'__dataclass__init__fields__0__default',
|
|
3207
|
-
'__dataclass__init__fields__10__annotation',
|
|
3208
3309
|
'__dataclass__init__fields__1__annotation',
|
|
3209
3310
|
'__dataclass__init__fields__1__default',
|
|
3210
3311
|
'__dataclass__init__fields__2__annotation',
|
|
3211
3312
|
'__dataclass__init__fields__2__default',
|
|
3212
|
-
'__dataclass__init__fields__3__annotation',
|
|
3213
|
-
'__dataclass__init__fields__3__default',
|
|
3214
|
-
'__dataclass__init__fields__4__annotation',
|
|
3215
|
-
'__dataclass__init__fields__4__default',
|
|
3216
|
-
'__dataclass__init__fields__5__annotation',
|
|
3217
|
-
'__dataclass__init__fields__5__default',
|
|
3218
|
-
'__dataclass__init__fields__6__annotation',
|
|
3219
|
-
'__dataclass__init__fields__6__default',
|
|
3220
|
-
'__dataclass__init__fields__7__annotation',
|
|
3221
|
-
'__dataclass__init__fields__7__default',
|
|
3222
|
-
'__dataclass__init__fields__8__annotation',
|
|
3223
|
-
'__dataclass__init__fields__8__default',
|
|
3224
|
-
'__dataclass__init__fields__9__annotation',
|
|
3225
|
-
'__dataclass__init__fields__9__default',
|
|
3226
3313
|
'__dataclass__repr__default_fn',
|
|
3227
3314
|
),
|
|
3228
3315
|
cls_names=(
|
|
3229
|
-
('ommlds.backends.ollama.protocol', '
|
|
3316
|
+
('ommlds.backends.ollama.protocol', 'Tool.Function'),
|
|
3230
3317
|
),
|
|
3231
3318
|
)
|
|
3232
|
-
def
|
|
3319
|
+
def _process_dataclass__c2256e8aae1a7cdef13cab0a48a15a27471904f0():
|
|
3233
3320
|
def _process_dataclass(
|
|
3234
3321
|
*,
|
|
3235
3322
|
__dataclass__cls,
|
|
3236
3323
|
__dataclass__init__fields__0__annotation,
|
|
3237
3324
|
__dataclass__init__fields__0__default,
|
|
3238
|
-
__dataclass__init__fields__10__annotation,
|
|
3239
3325
|
__dataclass__init__fields__1__annotation,
|
|
3240
3326
|
__dataclass__init__fields__1__default,
|
|
3241
3327
|
__dataclass__init__fields__2__annotation,
|
|
3242
3328
|
__dataclass__init__fields__2__default,
|
|
3243
|
-
__dataclass__init__fields__3__annotation,
|
|
3244
|
-
__dataclass__init__fields__3__default,
|
|
3245
|
-
__dataclass__init__fields__4__annotation,
|
|
3246
|
-
__dataclass__init__fields__4__default,
|
|
3247
|
-
__dataclass__init__fields__5__annotation,
|
|
3248
|
-
__dataclass__init__fields__5__default,
|
|
3249
|
-
__dataclass__init__fields__6__annotation,
|
|
3250
|
-
__dataclass__init__fields__6__default,
|
|
3251
|
-
__dataclass__init__fields__7__annotation,
|
|
3252
|
-
__dataclass__init__fields__7__default,
|
|
3253
|
-
__dataclass__init__fields__8__annotation,
|
|
3254
|
-
__dataclass__init__fields__8__default,
|
|
3255
|
-
__dataclass__init__fields__9__annotation,
|
|
3256
|
-
__dataclass__init__fields__9__default,
|
|
3257
3329
|
__dataclass__repr__default_fn,
|
|
3258
3330
|
__dataclass__FieldFnValidationError, # noqa
|
|
3259
3331
|
__dataclass__FieldTypeValidationError, # noqa
|
|
@@ -3273,17 +3345,9 @@ def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
|
3273
3345
|
if self.__class__ is not __dataclass__cls:
|
|
3274
3346
|
raise TypeError(self)
|
|
3275
3347
|
return __dataclass__cls( # noqa
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
done_reason=self.done_reason,
|
|
3280
|
-
total_duration=self.total_duration,
|
|
3281
|
-
load_duration=self.load_duration,
|
|
3282
|
-
prompt_eval_count=self.prompt_eval_count,
|
|
3283
|
-
prompt_eval_duration=self.prompt_eval_duration,
|
|
3284
|
-
eval_count=self.eval_count,
|
|
3285
|
-
eval_duration=self.eval_duration,
|
|
3286
|
-
message=self.message,
|
|
3348
|
+
name=self.name,
|
|
3349
|
+
description=self.description,
|
|
3350
|
+
parameters=self.parameters,
|
|
3287
3351
|
)
|
|
3288
3352
|
|
|
3289
3353
|
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
@@ -3297,17 +3361,9 @@ def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
|
3297
3361
|
if self.__class__ is not other.__class__:
|
|
3298
3362
|
return NotImplemented
|
|
3299
3363
|
return (
|
|
3300
|
-
self.
|
|
3301
|
-
self.
|
|
3302
|
-
self.
|
|
3303
|
-
self.done_reason == other.done_reason and
|
|
3304
|
-
self.total_duration == other.total_duration and
|
|
3305
|
-
self.load_duration == other.load_duration and
|
|
3306
|
-
self.prompt_eval_count == other.prompt_eval_count and
|
|
3307
|
-
self.prompt_eval_duration == other.prompt_eval_duration and
|
|
3308
|
-
self.eval_count == other.eval_count and
|
|
3309
|
-
self.eval_duration == other.eval_duration and
|
|
3310
|
-
self.message == other.message
|
|
3364
|
+
self.name == other.name and
|
|
3365
|
+
self.description == other.description and
|
|
3366
|
+
self.parameters == other.parameters
|
|
3311
3367
|
)
|
|
3312
3368
|
|
|
3313
3369
|
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
@@ -3316,17 +3372,9 @@ def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
|
3316
3372
|
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3317
3373
|
|
|
3318
3374
|
__dataclass___setattr_frozen_fields = {
|
|
3319
|
-
'
|
|
3320
|
-
'
|
|
3321
|
-
'
|
|
3322
|
-
'done_reason',
|
|
3323
|
-
'total_duration',
|
|
3324
|
-
'load_duration',
|
|
3325
|
-
'prompt_eval_count',
|
|
3326
|
-
'prompt_eval_duration',
|
|
3327
|
-
'eval_count',
|
|
3328
|
-
'eval_duration',
|
|
3329
|
-
'message',
|
|
3375
|
+
'name',
|
|
3376
|
+
'description',
|
|
3377
|
+
'parameters',
|
|
3330
3378
|
}
|
|
3331
3379
|
|
|
3332
3380
|
def __setattr__(self, name, value):
|
|
@@ -3343,17 +3391,9 @@ def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
|
3343
3391
|
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3344
3392
|
|
|
3345
3393
|
__dataclass___delattr_frozen_fields = {
|
|
3346
|
-
'
|
|
3347
|
-
'
|
|
3348
|
-
'
|
|
3349
|
-
'done_reason',
|
|
3350
|
-
'total_duration',
|
|
3351
|
-
'load_duration',
|
|
3352
|
-
'prompt_eval_count',
|
|
3353
|
-
'prompt_eval_duration',
|
|
3354
|
-
'eval_count',
|
|
3355
|
-
'eval_duration',
|
|
3356
|
-
'message',
|
|
3394
|
+
'name',
|
|
3395
|
+
'description',
|
|
3396
|
+
'parameters',
|
|
3357
3397
|
}
|
|
3358
3398
|
|
|
3359
3399
|
def __delattr__(self, name):
|
|
@@ -3371,17 +3411,9 @@ def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
|
3371
3411
|
|
|
3372
3412
|
def __hash__(self):
|
|
3373
3413
|
return hash((
|
|
3374
|
-
self.
|
|
3375
|
-
self.
|
|
3376
|
-
self.
|
|
3377
|
-
self.done_reason,
|
|
3378
|
-
self.total_duration,
|
|
3379
|
-
self.load_duration,
|
|
3380
|
-
self.prompt_eval_count,
|
|
3381
|
-
self.prompt_eval_duration,
|
|
3382
|
-
self.eval_count,
|
|
3383
|
-
self.eval_duration,
|
|
3384
|
-
self.message,
|
|
3414
|
+
self.name,
|
|
3415
|
+
self.description,
|
|
3416
|
+
self.parameters,
|
|
3385
3417
|
))
|
|
3386
3418
|
|
|
3387
3419
|
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
@@ -3390,29 +3422,13 @@ def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
|
3390
3422
|
def __init__(
|
|
3391
3423
|
self,
|
|
3392
3424
|
*,
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
done_reason: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
3397
|
-
total_duration: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
3398
|
-
load_duration: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
3399
|
-
prompt_eval_count: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
3400
|
-
prompt_eval_duration: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
3401
|
-
eval_count: __dataclass__init__fields__8__annotation = __dataclass__init__fields__8__default,
|
|
3402
|
-
eval_duration: __dataclass__init__fields__9__annotation = __dataclass__init__fields__9__default,
|
|
3403
|
-
message: __dataclass__init__fields__10__annotation,
|
|
3425
|
+
name: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
3426
|
+
description: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
3427
|
+
parameters: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
3404
3428
|
) -> __dataclass__None:
|
|
3405
|
-
__dataclass__object_setattr(self, '
|
|
3406
|
-
__dataclass__object_setattr(self, '
|
|
3407
|
-
__dataclass__object_setattr(self, '
|
|
3408
|
-
__dataclass__object_setattr(self, 'done_reason', done_reason)
|
|
3409
|
-
__dataclass__object_setattr(self, 'total_duration', total_duration)
|
|
3410
|
-
__dataclass__object_setattr(self, 'load_duration', load_duration)
|
|
3411
|
-
__dataclass__object_setattr(self, 'prompt_eval_count', prompt_eval_count)
|
|
3412
|
-
__dataclass__object_setattr(self, 'prompt_eval_duration', prompt_eval_duration)
|
|
3413
|
-
__dataclass__object_setattr(self, 'eval_count', eval_count)
|
|
3414
|
-
__dataclass__object_setattr(self, 'eval_duration', eval_duration)
|
|
3415
|
-
__dataclass__object_setattr(self, 'message', message)
|
|
3429
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
3430
|
+
__dataclass__object_setattr(self, 'description', description)
|
|
3431
|
+
__dataclass__object_setattr(self, 'parameters', parameters)
|
|
3416
3432
|
|
|
3417
3433
|
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3418
3434
|
if '__init__' in __dataclass__cls.__dict__:
|
|
@@ -3422,28 +3438,12 @@ def _process_dataclass__f14f2c9137552599b1b611852176514b259abb93():
|
|
|
3422
3438
|
@__dataclass___recursive_repr()
|
|
3423
3439
|
def __repr__(self):
|
|
3424
3440
|
parts = []
|
|
3425
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
3426
|
-
parts.append(f"
|
|
3427
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
3428
|
-
parts.append(f"
|
|
3429
|
-
if (s := __dataclass__repr__default_fn(self.
|
|
3430
|
-
parts.append(f"
|
|
3431
|
-
if (s := __dataclass__repr__default_fn(self.done_reason)) is not None:
|
|
3432
|
-
parts.append(f"done_reason={s}")
|
|
3433
|
-
if (s := __dataclass__repr__default_fn(self.total_duration)) is not None:
|
|
3434
|
-
parts.append(f"total_duration={s}")
|
|
3435
|
-
if (s := __dataclass__repr__default_fn(self.load_duration)) is not None:
|
|
3436
|
-
parts.append(f"load_duration={s}")
|
|
3437
|
-
if (s := __dataclass__repr__default_fn(self.prompt_eval_count)) is not None:
|
|
3438
|
-
parts.append(f"prompt_eval_count={s}")
|
|
3439
|
-
if (s := __dataclass__repr__default_fn(self.prompt_eval_duration)) is not None:
|
|
3440
|
-
parts.append(f"prompt_eval_duration={s}")
|
|
3441
|
-
if (s := __dataclass__repr__default_fn(self.eval_count)) is not None:
|
|
3442
|
-
parts.append(f"eval_count={s}")
|
|
3443
|
-
if (s := __dataclass__repr__default_fn(self.eval_duration)) is not None:
|
|
3444
|
-
parts.append(f"eval_duration={s}")
|
|
3445
|
-
if (s := __dataclass__repr__default_fn(self.message)) is not None:
|
|
3446
|
-
parts.append(f"message={s}")
|
|
3441
|
+
if (s := __dataclass__repr__default_fn(self.name)) is not None:
|
|
3442
|
+
parts.append(f"name={s}")
|
|
3443
|
+
if (s := __dataclass__repr__default_fn(self.description)) is not None:
|
|
3444
|
+
parts.append(f"description={s}")
|
|
3445
|
+
if (s := __dataclass__repr__default_fn(self.parameters)) is not None:
|
|
3446
|
+
parts.append(f"parameters={s}")
|
|
3447
3447
|
return (
|
|
3448
3448
|
f"{self.__class__.__qualname__}("
|
|
3449
3449
|
f"{', '.join(parts)}"
|