ommlds 0.0.0.dev480__py3-none-any.whl → 0.0.0.dev482__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 +18 -18
- ommlds/backends/anthropic/protocol/__init__.py +13 -1
- ommlds/backends/anthropic/protocol/_dataclasses.py +4375 -0
- ommlds/backends/google/protocol/__init__.py +13 -0
- ommlds/backends/google/protocol/_dataclasses.py +8748 -0
- ommlds/backends/groq/__init__.py +7 -0
- ommlds/backends/groq/_dataclasses.py +6651 -0
- ommlds/backends/llamacpp/logging.py +4 -1
- ommlds/backends/mlx/caching.py +7 -3
- ommlds/backends/mlx/cli.py +10 -7
- ommlds/backends/mlx/generation.py +18 -16
- ommlds/backends/mlx/limits.py +10 -6
- ommlds/backends/mlx/loading.py +7 -4
- ommlds/backends/ollama/__init__.py +7 -0
- ommlds/backends/ollama/_dataclasses.py +3458 -0
- ommlds/backends/openai/protocol/__init__.py +15 -1
- ommlds/backends/openai/protocol/_dataclasses.py +10458 -0
- ommlds/backends/tavily/__init__.py +7 -0
- ommlds/backends/tavily/_dataclasses.py +2907 -0
- ommlds/backends/transformers/__init__.py +14 -0
- ommlds/cli/__init__.py +7 -0
- ommlds/cli/_dataclasses.py +10630 -0
- ommlds/minichain/_dataclasses.py +42199 -0
- ommlds/minichain/backends/impls/duckduckgo/search.py +5 -1
- ommlds/minichain/backends/impls/huggingface/repos.py +1 -5
- ommlds/minichain/backends/impls/llamacpp/chat.py +6 -3
- ommlds/minichain/backends/impls/llamacpp/completion.py +7 -3
- ommlds/minichain/backends/impls/llamacpp/stream.py +6 -3
- ommlds/minichain/backends/impls/mlx/chat.py +6 -3
- ommlds/minichain/backends/impls/sentencepiece/tokens.py +9 -6
- ommlds/minichain/backends/impls/tinygrad/chat.py +7 -4
- ommlds/minichain/backends/impls/tokenizers/tokens.py +9 -6
- ommlds/minichain/backends/impls/transformers/sentence.py +5 -2
- ommlds/minichain/backends/impls/transformers/tokens.py +9 -6
- ommlds/minichain/backends/impls/transformers/transformers.py +10 -8
- ommlds/specs/mcp/clients.py +146 -0
- ommlds/specs/mcp/protocol.py +123 -18
- {ommlds-0.0.0.dev480.dist-info → ommlds-0.0.0.dev482.dist-info}/METADATA +3 -3
- {ommlds-0.0.0.dev480.dist-info → ommlds-0.0.0.dev482.dist-info}/RECORD +43 -34
- {ommlds-0.0.0.dev480.dist-info → ommlds-0.0.0.dev482.dist-info}/WHEEL +0 -0
- {ommlds-0.0.0.dev480.dist-info → ommlds-0.0.0.dev482.dist-info}/entry_points.txt +0 -0
- {ommlds-0.0.0.dev480.dist-info → ommlds-0.0.0.dev482.dist-info}/licenses/LICENSE +0 -0
- {ommlds-0.0.0.dev480.dist-info → ommlds-0.0.0.dev482.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,4375 @@
|
|
|
1
|
+
# @omlish-generated
|
|
2
|
+
# type: ignore
|
|
3
|
+
# ruff: noqa
|
|
4
|
+
# flake8: noqa
|
|
5
|
+
import dataclasses
|
|
6
|
+
import reprlib
|
|
7
|
+
import types
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
##
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
REGISTRY = {}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _register(**kwargs):
|
|
17
|
+
def inner(fn):
|
|
18
|
+
REGISTRY[kwargs['plan_repr']] = (kwargs, fn)
|
|
19
|
+
return fn
|
|
20
|
+
return inner
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
##
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@_register(
|
|
27
|
+
plan_repr=(
|
|
28
|
+
"Plans(tup=(CopyPlan(fields=('id', 'role', 'model', 'content', 'stop_reason', 'stop_sequence', 'usage')), EqPla"
|
|
29
|
+
"n(fields=('id', 'role', 'model', 'content', 'stop_reason', 'stop_sequence', 'usage')), FrozenPlan(fields=('id'"
|
|
30
|
+
", 'role', 'model', 'content', 'stop_reason', 'stop_sequence', 'usage'), allow_dynamic_dunder_attrs=False), Has"
|
|
31
|
+
"hPlan(action='add', fields=('id', 'role', 'model', 'content', 'stop_reason', 'stop_sequence', 'usage'), cache="
|
|
32
|
+
"False), InitPlan(fields=(InitPlan.Field(name='id', annotation=OpRef(name='init.fields.0.annotation'), default="
|
|
33
|
+
"OpRef(name='init.fields.0.default'), default_factory=None, init=True, override=False, field_type=FieldType.INS"
|
|
34
|
+
"TANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='role', annotation=OpRef(name='init.f"
|
|
35
|
+
"ields.1.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INST"
|
|
36
|
+
"ANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='model', annotation=OpRef(name='init.f"
|
|
37
|
+
"ields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=F"
|
|
38
|
+
"alse, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='conten"
|
|
39
|
+
"t', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.default'), default_fa"
|
|
40
|
+
"ctory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=N"
|
|
41
|
+
"one), InitPlan.Field(name='stop_reason', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name"
|
|
42
|
+
"='init.fields.4.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coe"
|
|
43
|
+
"rce=None, validate=None, check_type=None), InitPlan.Field(name='stop_sequence', annotation=OpRef(name='init.fi"
|
|
44
|
+
"elds.5.annotation'), default=OpRef(name='init.fields.5.default'), default_factory=None, init=True, override=Fa"
|
|
45
|
+
"lse, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='usage',"
|
|
46
|
+
" annotation=OpRef(name='init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), default_facto"
|
|
47
|
+
"ry=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None"
|
|
48
|
+
")), self_param='self', std_params=(), kw_only_params=('id', 'role', 'model', 'content', 'stop_reason', 'stop_s"
|
|
49
|
+
"equence', 'usage'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(f"
|
|
50
|
+
"ields=(ReprPlan.Field(name='id', kw_only=True, fn=None), ReprPlan.Field(name='role', kw_only=True, fn=None), R"
|
|
51
|
+
"eprPlan.Field(name='model', kw_only=True, fn=None), ReprPlan.Field(name='content', kw_only=True, fn=None), Rep"
|
|
52
|
+
"rPlan.Field(name='stop_reason', kw_only=True, fn=None), ReprPlan.Field(name='stop_sequence', kw_only=True, fn="
|
|
53
|
+
"None), ReprPlan.Field(name='usage', kw_only=True, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
54
|
+
),
|
|
55
|
+
plan_repr_sha1='0015c87bf45f234d7348dcf89efe0412c3e6435c',
|
|
56
|
+
op_ref_idents=(
|
|
57
|
+
'__dataclass__init__fields__0__annotation',
|
|
58
|
+
'__dataclass__init__fields__0__default',
|
|
59
|
+
'__dataclass__init__fields__1__annotation',
|
|
60
|
+
'__dataclass__init__fields__2__annotation',
|
|
61
|
+
'__dataclass__init__fields__2__default',
|
|
62
|
+
'__dataclass__init__fields__3__annotation',
|
|
63
|
+
'__dataclass__init__fields__3__default',
|
|
64
|
+
'__dataclass__init__fields__4__annotation',
|
|
65
|
+
'__dataclass__init__fields__4__default',
|
|
66
|
+
'__dataclass__init__fields__5__annotation',
|
|
67
|
+
'__dataclass__init__fields__5__default',
|
|
68
|
+
'__dataclass__init__fields__6__annotation',
|
|
69
|
+
'__dataclass__init__fields__6__default',
|
|
70
|
+
),
|
|
71
|
+
cls_names=(
|
|
72
|
+
('ommlds.backends.anthropic.protocol', 'Message'),
|
|
73
|
+
),
|
|
74
|
+
)
|
|
75
|
+
def _process_dataclass__0015c87bf45f234d7348dcf89efe0412c3e6435c():
|
|
76
|
+
def _process_dataclass(
|
|
77
|
+
*,
|
|
78
|
+
__dataclass__cls,
|
|
79
|
+
__dataclass__init__fields__0__annotation,
|
|
80
|
+
__dataclass__init__fields__0__default,
|
|
81
|
+
__dataclass__init__fields__1__annotation,
|
|
82
|
+
__dataclass__init__fields__2__annotation,
|
|
83
|
+
__dataclass__init__fields__2__default,
|
|
84
|
+
__dataclass__init__fields__3__annotation,
|
|
85
|
+
__dataclass__init__fields__3__default,
|
|
86
|
+
__dataclass__init__fields__4__annotation,
|
|
87
|
+
__dataclass__init__fields__4__default,
|
|
88
|
+
__dataclass__init__fields__5__annotation,
|
|
89
|
+
__dataclass__init__fields__5__default,
|
|
90
|
+
__dataclass__init__fields__6__annotation,
|
|
91
|
+
__dataclass__init__fields__6__default,
|
|
92
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
93
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
94
|
+
__dataclass__FnValidationError, # noqa
|
|
95
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
96
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
97
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
98
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
99
|
+
__dataclass__None=None, # noqa
|
|
100
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
101
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
102
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
103
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
104
|
+
__dataclass__property=property, # noqa
|
|
105
|
+
):
|
|
106
|
+
def __copy__(self):
|
|
107
|
+
if self.__class__ is not __dataclass__cls:
|
|
108
|
+
raise TypeError(self)
|
|
109
|
+
return __dataclass__cls( # noqa
|
|
110
|
+
id=self.id,
|
|
111
|
+
role=self.role,
|
|
112
|
+
model=self.model,
|
|
113
|
+
content=self.content,
|
|
114
|
+
stop_reason=self.stop_reason,
|
|
115
|
+
stop_sequence=self.stop_sequence,
|
|
116
|
+
usage=self.usage,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
120
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
121
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
122
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
123
|
+
|
|
124
|
+
def __eq__(self, other):
|
|
125
|
+
if self is other:
|
|
126
|
+
return True
|
|
127
|
+
if self.__class__ is not other.__class__:
|
|
128
|
+
return NotImplemented
|
|
129
|
+
return (
|
|
130
|
+
self.id == other.id and
|
|
131
|
+
self.role == other.role and
|
|
132
|
+
self.model == other.model and
|
|
133
|
+
self.content == other.content and
|
|
134
|
+
self.stop_reason == other.stop_reason and
|
|
135
|
+
self.stop_sequence == other.stop_sequence and
|
|
136
|
+
self.usage == other.usage
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
140
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
141
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
142
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
143
|
+
|
|
144
|
+
__dataclass___setattr_frozen_fields = {
|
|
145
|
+
'id',
|
|
146
|
+
'role',
|
|
147
|
+
'model',
|
|
148
|
+
'content',
|
|
149
|
+
'stop_reason',
|
|
150
|
+
'stop_sequence',
|
|
151
|
+
'usage',
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
def __setattr__(self, name, value):
|
|
155
|
+
if (
|
|
156
|
+
type(self) is __dataclass__cls
|
|
157
|
+
or name in __dataclass___setattr_frozen_fields
|
|
158
|
+
):
|
|
159
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
160
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
161
|
+
|
|
162
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
163
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
164
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
165
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
166
|
+
|
|
167
|
+
__dataclass___delattr_frozen_fields = {
|
|
168
|
+
'id',
|
|
169
|
+
'role',
|
|
170
|
+
'model',
|
|
171
|
+
'content',
|
|
172
|
+
'stop_reason',
|
|
173
|
+
'stop_sequence',
|
|
174
|
+
'usage',
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
def __delattr__(self, name):
|
|
178
|
+
if (
|
|
179
|
+
type(self) is __dataclass__cls
|
|
180
|
+
or name in __dataclass___delattr_frozen_fields
|
|
181
|
+
):
|
|
182
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
183
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
184
|
+
|
|
185
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
186
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
187
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
188
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
189
|
+
|
|
190
|
+
def __hash__(self):
|
|
191
|
+
return hash((
|
|
192
|
+
self.id,
|
|
193
|
+
self.role,
|
|
194
|
+
self.model,
|
|
195
|
+
self.content,
|
|
196
|
+
self.stop_reason,
|
|
197
|
+
self.stop_sequence,
|
|
198
|
+
self.usage,
|
|
199
|
+
))
|
|
200
|
+
|
|
201
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
202
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
203
|
+
|
|
204
|
+
def __init__(
|
|
205
|
+
self,
|
|
206
|
+
*,
|
|
207
|
+
id: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
208
|
+
role: __dataclass__init__fields__1__annotation,
|
|
209
|
+
model: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
210
|
+
content: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
211
|
+
stop_reason: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
212
|
+
stop_sequence: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
213
|
+
usage: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
214
|
+
) -> __dataclass__None:
|
|
215
|
+
__dataclass__object_setattr(self, 'id', id)
|
|
216
|
+
__dataclass__object_setattr(self, 'role', role)
|
|
217
|
+
__dataclass__object_setattr(self, 'model', model)
|
|
218
|
+
__dataclass__object_setattr(self, 'content', content)
|
|
219
|
+
__dataclass__object_setattr(self, 'stop_reason', stop_reason)
|
|
220
|
+
__dataclass__object_setattr(self, 'stop_sequence', stop_sequence)
|
|
221
|
+
__dataclass__object_setattr(self, 'usage', usage)
|
|
222
|
+
|
|
223
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
224
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
225
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
226
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
227
|
+
|
|
228
|
+
@__dataclass___recursive_repr()
|
|
229
|
+
def __repr__(self):
|
|
230
|
+
parts = []
|
|
231
|
+
parts.append(f"id={self.id!r}")
|
|
232
|
+
parts.append(f"role={self.role!r}")
|
|
233
|
+
parts.append(f"model={self.model!r}")
|
|
234
|
+
parts.append(f"content={self.content!r}")
|
|
235
|
+
parts.append(f"stop_reason={self.stop_reason!r}")
|
|
236
|
+
parts.append(f"stop_sequence={self.stop_sequence!r}")
|
|
237
|
+
parts.append(f"usage={self.usage!r}")
|
|
238
|
+
return (
|
|
239
|
+
f"{self.__class__.__qualname__}("
|
|
240
|
+
f"{', '.join(parts)}"
|
|
241
|
+
f")"
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
245
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
246
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
247
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
248
|
+
|
|
249
|
+
return _process_dataclass
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
@_register(
|
|
253
|
+
plan_repr=(
|
|
254
|
+
"Plans(tup=(CopyPlan(fields=('model', 'messages', 'system', 'tools', 'temperature', 'max_tokens', 'stream', 'be"
|
|
255
|
+
"tas', 'metadata')), EqPlan(fields=('model', 'messages', 'system', 'tools', 'temperature', 'max_tokens', 'strea"
|
|
256
|
+
"m', 'betas', 'metadata')), FrozenPlan(fields=('model', 'messages', 'system', 'tools', 'temperature', 'max_toke"
|
|
257
|
+
"ns', 'stream', 'betas', 'metadata'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('model'"
|
|
258
|
+
", 'messages', 'system', 'tools', 'temperature', 'max_tokens', 'stream', 'betas', 'metadata'), cache=False), In"
|
|
259
|
+
"itPlan(fields=(InitPlan.Field(name='model', annotation=OpRef(name='init.fields.0.annotation'), default=None, d"
|
|
260
|
+
"efault_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, che"
|
|
261
|
+
"ck_type=None), InitPlan.Field(name='messages', annotation=OpRef(name='init.fields.1.annotation'), default=None"
|
|
262
|
+
", default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, "
|
|
263
|
+
"check_type=None), InitPlan.Field(name='system', annotation=OpRef(name='init.fields.2.annotation'), default=OpR"
|
|
264
|
+
"ef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTAN"
|
|
265
|
+
"CE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='tools', annotation=OpRef(name='init.fie"
|
|
266
|
+
"lds.3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True, override=Fal"
|
|
267
|
+
"se, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='temperat"
|
|
268
|
+
"ure', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_"
|
|
269
|
+
"factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type"
|
|
270
|
+
"=None), InitPlan.Field(name='max_tokens', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(nam"
|
|
271
|
+
"e='init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, co"
|
|
272
|
+
"erce=None, validate=None, check_type=None), InitPlan.Field(name='stream', annotation=OpRef(name='init.fields.6"
|
|
273
|
+
".annotation'), default=OpRef(name='init.fields.6.default'), default_factory=None, init=True, override=False, f"
|
|
274
|
+
"ield_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='betas', annot"
|
|
275
|
+
"ation=OpRef(name='init.fields.7.annotation'), default=OpRef(name='init.fields.7.default'), default_factory=Non"
|
|
276
|
+
"e, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), Ini"
|
|
277
|
+
"tPlan.Field(name='metadata', annotation=OpRef(name='init.fields.8.annotation'), default=OpRef(name='init.field"
|
|
278
|
+
"s.8.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, va"
|
|
279
|
+
"lidate=None, check_type=None)), self_param='self', std_params=('model', 'messages'), kw_only_params=('system',"
|
|
280
|
+
" 'tools', 'temperature', 'max_tokens', 'stream', 'betas', 'metadata'), frozen=True, slots=False, post_init_par"
|
|
281
|
+
"ams=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='model', kw_only=False, fn=None)"
|
|
282
|
+
", ReprPlan.Field(name='messages', kw_only=False, fn=None), ReprPlan.Field(name='system', kw_only=True, fn=None"
|
|
283
|
+
"), ReprPlan.Field(name='tools', kw_only=True, fn=None), ReprPlan.Field(name='temperature', kw_only=True, fn=No"
|
|
284
|
+
"ne), ReprPlan.Field(name='max_tokens', kw_only=True, fn=None), ReprPlan.Field(name='stream', kw_only=True, fn="
|
|
285
|
+
"None), ReprPlan.Field(name='betas', kw_only=True, fn=None), ReprPlan.Field(name='metadata', kw_only=True, fn=N"
|
|
286
|
+
"one)), id=False, terse=False, default_fn=None)))"
|
|
287
|
+
),
|
|
288
|
+
plan_repr_sha1='0463f328955d284d5544ccd611d1fd041bc308ab',
|
|
289
|
+
op_ref_idents=(
|
|
290
|
+
'__dataclass__init__fields__0__annotation',
|
|
291
|
+
'__dataclass__init__fields__1__annotation',
|
|
292
|
+
'__dataclass__init__fields__2__annotation',
|
|
293
|
+
'__dataclass__init__fields__2__default',
|
|
294
|
+
'__dataclass__init__fields__3__annotation',
|
|
295
|
+
'__dataclass__init__fields__3__default',
|
|
296
|
+
'__dataclass__init__fields__4__annotation',
|
|
297
|
+
'__dataclass__init__fields__4__default',
|
|
298
|
+
'__dataclass__init__fields__5__annotation',
|
|
299
|
+
'__dataclass__init__fields__5__default',
|
|
300
|
+
'__dataclass__init__fields__6__annotation',
|
|
301
|
+
'__dataclass__init__fields__6__default',
|
|
302
|
+
'__dataclass__init__fields__7__annotation',
|
|
303
|
+
'__dataclass__init__fields__7__default',
|
|
304
|
+
'__dataclass__init__fields__8__annotation',
|
|
305
|
+
'__dataclass__init__fields__8__default',
|
|
306
|
+
),
|
|
307
|
+
cls_names=(
|
|
308
|
+
('ommlds.backends.anthropic.protocol', 'MessagesRequest'),
|
|
309
|
+
),
|
|
310
|
+
)
|
|
311
|
+
def _process_dataclass__0463f328955d284d5544ccd611d1fd041bc308ab():
|
|
312
|
+
def _process_dataclass(
|
|
313
|
+
*,
|
|
314
|
+
__dataclass__cls,
|
|
315
|
+
__dataclass__init__fields__0__annotation,
|
|
316
|
+
__dataclass__init__fields__1__annotation,
|
|
317
|
+
__dataclass__init__fields__2__annotation,
|
|
318
|
+
__dataclass__init__fields__2__default,
|
|
319
|
+
__dataclass__init__fields__3__annotation,
|
|
320
|
+
__dataclass__init__fields__3__default,
|
|
321
|
+
__dataclass__init__fields__4__annotation,
|
|
322
|
+
__dataclass__init__fields__4__default,
|
|
323
|
+
__dataclass__init__fields__5__annotation,
|
|
324
|
+
__dataclass__init__fields__5__default,
|
|
325
|
+
__dataclass__init__fields__6__annotation,
|
|
326
|
+
__dataclass__init__fields__6__default,
|
|
327
|
+
__dataclass__init__fields__7__annotation,
|
|
328
|
+
__dataclass__init__fields__7__default,
|
|
329
|
+
__dataclass__init__fields__8__annotation,
|
|
330
|
+
__dataclass__init__fields__8__default,
|
|
331
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
332
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
333
|
+
__dataclass__FnValidationError, # noqa
|
|
334
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
335
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
336
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
337
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
338
|
+
__dataclass__None=None, # noqa
|
|
339
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
340
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
341
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
342
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
343
|
+
__dataclass__property=property, # noqa
|
|
344
|
+
):
|
|
345
|
+
def __copy__(self):
|
|
346
|
+
if self.__class__ is not __dataclass__cls:
|
|
347
|
+
raise TypeError(self)
|
|
348
|
+
return __dataclass__cls( # noqa
|
|
349
|
+
model=self.model,
|
|
350
|
+
messages=self.messages,
|
|
351
|
+
system=self.system,
|
|
352
|
+
tools=self.tools,
|
|
353
|
+
temperature=self.temperature,
|
|
354
|
+
max_tokens=self.max_tokens,
|
|
355
|
+
stream=self.stream,
|
|
356
|
+
betas=self.betas,
|
|
357
|
+
metadata=self.metadata,
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
361
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
362
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
363
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
364
|
+
|
|
365
|
+
def __eq__(self, other):
|
|
366
|
+
if self is other:
|
|
367
|
+
return True
|
|
368
|
+
if self.__class__ is not other.__class__:
|
|
369
|
+
return NotImplemented
|
|
370
|
+
return (
|
|
371
|
+
self.model == other.model and
|
|
372
|
+
self.messages == other.messages and
|
|
373
|
+
self.system == other.system and
|
|
374
|
+
self.tools == other.tools and
|
|
375
|
+
self.temperature == other.temperature and
|
|
376
|
+
self.max_tokens == other.max_tokens and
|
|
377
|
+
self.stream == other.stream and
|
|
378
|
+
self.betas == other.betas and
|
|
379
|
+
self.metadata == other.metadata
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
383
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
384
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
385
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
386
|
+
|
|
387
|
+
__dataclass___setattr_frozen_fields = {
|
|
388
|
+
'model',
|
|
389
|
+
'messages',
|
|
390
|
+
'system',
|
|
391
|
+
'tools',
|
|
392
|
+
'temperature',
|
|
393
|
+
'max_tokens',
|
|
394
|
+
'stream',
|
|
395
|
+
'betas',
|
|
396
|
+
'metadata',
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
def __setattr__(self, name, value):
|
|
400
|
+
if (
|
|
401
|
+
type(self) is __dataclass__cls
|
|
402
|
+
or name in __dataclass___setattr_frozen_fields
|
|
403
|
+
):
|
|
404
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
405
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
406
|
+
|
|
407
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
408
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
409
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
410
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
411
|
+
|
|
412
|
+
__dataclass___delattr_frozen_fields = {
|
|
413
|
+
'model',
|
|
414
|
+
'messages',
|
|
415
|
+
'system',
|
|
416
|
+
'tools',
|
|
417
|
+
'temperature',
|
|
418
|
+
'max_tokens',
|
|
419
|
+
'stream',
|
|
420
|
+
'betas',
|
|
421
|
+
'metadata',
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
def __delattr__(self, name):
|
|
425
|
+
if (
|
|
426
|
+
type(self) is __dataclass__cls
|
|
427
|
+
or name in __dataclass___delattr_frozen_fields
|
|
428
|
+
):
|
|
429
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
430
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
431
|
+
|
|
432
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
433
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
434
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
435
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
436
|
+
|
|
437
|
+
def __hash__(self):
|
|
438
|
+
return hash((
|
|
439
|
+
self.model,
|
|
440
|
+
self.messages,
|
|
441
|
+
self.system,
|
|
442
|
+
self.tools,
|
|
443
|
+
self.temperature,
|
|
444
|
+
self.max_tokens,
|
|
445
|
+
self.stream,
|
|
446
|
+
self.betas,
|
|
447
|
+
self.metadata,
|
|
448
|
+
))
|
|
449
|
+
|
|
450
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
451
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
452
|
+
|
|
453
|
+
def __init__(
|
|
454
|
+
self,
|
|
455
|
+
model: __dataclass__init__fields__0__annotation,
|
|
456
|
+
messages: __dataclass__init__fields__1__annotation,
|
|
457
|
+
*,
|
|
458
|
+
system: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
459
|
+
tools: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
460
|
+
temperature: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
461
|
+
max_tokens: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
462
|
+
stream: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
463
|
+
betas: __dataclass__init__fields__7__annotation = __dataclass__init__fields__7__default,
|
|
464
|
+
metadata: __dataclass__init__fields__8__annotation = __dataclass__init__fields__8__default,
|
|
465
|
+
) -> __dataclass__None:
|
|
466
|
+
__dataclass__object_setattr(self, 'model', model)
|
|
467
|
+
__dataclass__object_setattr(self, 'messages', messages)
|
|
468
|
+
__dataclass__object_setattr(self, 'system', system)
|
|
469
|
+
__dataclass__object_setattr(self, 'tools', tools)
|
|
470
|
+
__dataclass__object_setattr(self, 'temperature', temperature)
|
|
471
|
+
__dataclass__object_setattr(self, 'max_tokens', max_tokens)
|
|
472
|
+
__dataclass__object_setattr(self, 'stream', stream)
|
|
473
|
+
__dataclass__object_setattr(self, 'betas', betas)
|
|
474
|
+
__dataclass__object_setattr(self, 'metadata', metadata)
|
|
475
|
+
|
|
476
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
477
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
478
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
479
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
480
|
+
|
|
481
|
+
@__dataclass___recursive_repr()
|
|
482
|
+
def __repr__(self):
|
|
483
|
+
parts = []
|
|
484
|
+
parts.append(f"model={self.model!r}")
|
|
485
|
+
parts.append(f"messages={self.messages!r}")
|
|
486
|
+
parts.append(f"system={self.system!r}")
|
|
487
|
+
parts.append(f"tools={self.tools!r}")
|
|
488
|
+
parts.append(f"temperature={self.temperature!r}")
|
|
489
|
+
parts.append(f"max_tokens={self.max_tokens!r}")
|
|
490
|
+
parts.append(f"stream={self.stream!r}")
|
|
491
|
+
parts.append(f"betas={self.betas!r}")
|
|
492
|
+
parts.append(f"metadata={self.metadata!r}")
|
|
493
|
+
return (
|
|
494
|
+
f"{self.__class__.__qualname__}("
|
|
495
|
+
f"{', '.join(parts)}"
|
|
496
|
+
f")"
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
500
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
501
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
502
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
503
|
+
|
|
504
|
+
return _process_dataclass
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
@_register(
|
|
508
|
+
plan_repr=(
|
|
509
|
+
"Plans(tup=(CopyPlan(fields=('dct', 'specials')), EqPlan(fields=('dct', 'specials')), FrozenPlan(fields=('dct',"
|
|
510
|
+
" 'specials'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('dct', 'specials'), cache=Fals"
|
|
511
|
+
"e), InitPlan(fields=(InitPlan.Field(name='dct', annotation=OpRef(name='init.fields.0.annotation'), default=Non"
|
|
512
|
+
"e, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None,"
|
|
513
|
+
" check_type=None), InitPlan.Field(name='specials', annotation=OpRef(name='init.fields.1.annotation'), default="
|
|
514
|
+
"OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_type=FieldType.INS"
|
|
515
|
+
"TANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('dct',), kw_only_params=("
|
|
516
|
+
"'specials',), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields="
|
|
517
|
+
"(ReprPlan.Field(name='dct', kw_only=False, fn=None), ReprPlan.Field(name='specials', kw_only=True, fn=None)), "
|
|
518
|
+
"id=False, terse=False, default_fn=None)))"
|
|
519
|
+
),
|
|
520
|
+
plan_repr_sha1='1be8e124c66f00c82a764169ffbcb93f04b0b647',
|
|
521
|
+
op_ref_idents=(
|
|
522
|
+
'__dataclass__init__fields__0__annotation',
|
|
523
|
+
'__dataclass__init__fields__1__annotation',
|
|
524
|
+
'__dataclass__init__fields__1__default',
|
|
525
|
+
),
|
|
526
|
+
cls_names=(
|
|
527
|
+
('ommlds.backends.anthropic.protocol._marshal', 'SimpleObjectMarshalerFactory'),
|
|
528
|
+
('ommlds.backends.anthropic.protocol._marshal', 'SimpleObjectUnmarshalerFactory'),
|
|
529
|
+
),
|
|
530
|
+
)
|
|
531
|
+
def _process_dataclass__1be8e124c66f00c82a764169ffbcb93f04b0b647():
|
|
532
|
+
def _process_dataclass(
|
|
533
|
+
*,
|
|
534
|
+
__dataclass__cls,
|
|
535
|
+
__dataclass__init__fields__0__annotation,
|
|
536
|
+
__dataclass__init__fields__1__annotation,
|
|
537
|
+
__dataclass__init__fields__1__default,
|
|
538
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
539
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
540
|
+
__dataclass__FnValidationError, # noqa
|
|
541
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
542
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
543
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
544
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
545
|
+
__dataclass__None=None, # noqa
|
|
546
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
547
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
548
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
549
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
550
|
+
__dataclass__property=property, # noqa
|
|
551
|
+
):
|
|
552
|
+
def __copy__(self):
|
|
553
|
+
if self.__class__ is not __dataclass__cls:
|
|
554
|
+
raise TypeError(self)
|
|
555
|
+
return __dataclass__cls( # noqa
|
|
556
|
+
dct=self.dct,
|
|
557
|
+
specials=self.specials,
|
|
558
|
+
)
|
|
559
|
+
|
|
560
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
561
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
562
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
563
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
564
|
+
|
|
565
|
+
def __eq__(self, other):
|
|
566
|
+
if self is other:
|
|
567
|
+
return True
|
|
568
|
+
if self.__class__ is not other.__class__:
|
|
569
|
+
return NotImplemented
|
|
570
|
+
return (
|
|
571
|
+
self.dct == other.dct and
|
|
572
|
+
self.specials == other.specials
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
576
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
577
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
578
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
579
|
+
|
|
580
|
+
__dataclass___setattr_frozen_fields = {
|
|
581
|
+
'dct',
|
|
582
|
+
'specials',
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
def __setattr__(self, name, value):
|
|
586
|
+
if (
|
|
587
|
+
type(self) is __dataclass__cls
|
|
588
|
+
or name in __dataclass___setattr_frozen_fields
|
|
589
|
+
):
|
|
590
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
591
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
592
|
+
|
|
593
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
594
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
595
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
596
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
597
|
+
|
|
598
|
+
__dataclass___delattr_frozen_fields = {
|
|
599
|
+
'dct',
|
|
600
|
+
'specials',
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
def __delattr__(self, name):
|
|
604
|
+
if (
|
|
605
|
+
type(self) is __dataclass__cls
|
|
606
|
+
or name in __dataclass___delattr_frozen_fields
|
|
607
|
+
):
|
|
608
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
609
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
610
|
+
|
|
611
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
612
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
613
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
614
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
615
|
+
|
|
616
|
+
def __hash__(self):
|
|
617
|
+
return hash((
|
|
618
|
+
self.dct,
|
|
619
|
+
self.specials,
|
|
620
|
+
))
|
|
621
|
+
|
|
622
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
623
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
624
|
+
|
|
625
|
+
def __init__(
|
|
626
|
+
self,
|
|
627
|
+
dct: __dataclass__init__fields__0__annotation,
|
|
628
|
+
*,
|
|
629
|
+
specials: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
630
|
+
) -> __dataclass__None:
|
|
631
|
+
__dataclass__object_setattr(self, 'dct', dct)
|
|
632
|
+
__dataclass__object_setattr(self, 'specials', specials)
|
|
633
|
+
|
|
634
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
635
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
636
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
637
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
638
|
+
|
|
639
|
+
@__dataclass___recursive_repr()
|
|
640
|
+
def __repr__(self):
|
|
641
|
+
parts = []
|
|
642
|
+
parts.append(f"dct={self.dct!r}")
|
|
643
|
+
parts.append(f"specials={self.specials!r}")
|
|
644
|
+
return (
|
|
645
|
+
f"{self.__class__.__qualname__}("
|
|
646
|
+
f"{', '.join(parts)}"
|
|
647
|
+
f")"
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
651
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
652
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
653
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
654
|
+
|
|
655
|
+
return _process_dataclass
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
@_register(
|
|
659
|
+
plan_repr=(
|
|
660
|
+
"Plans(tup=(CopyPlan(fields=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal')), "
|
|
661
|
+
"EqPlan(fields=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal')), FrozenPlan(fi"
|
|
662
|
+
"elds=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal'), allow_dynamic_dunder_at"
|
|
663
|
+
"trs=False), HashPlan(action='add', fields=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no"
|
|
664
|
+
"_unmarshal'), cache=False), InitPlan(fields=(InitPlan.Field(name='omit_if', annotation=OpRef(name='init.fields"
|
|
665
|
+
".0.annotation'), default=OpRef(name='init.fields.0.default'), default_factory=None, init=True, override=False,"
|
|
666
|
+
" field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='default', a"
|
|
667
|
+
"nnotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory"
|
|
668
|
+
"=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=OpRef("
|
|
669
|
+
"name='init.fields.1.check_type')), InitPlan.Field(name='embed', annotation=OpRef(name='init.fields.2.annotatio"
|
|
670
|
+
"n'), default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_type="
|
|
671
|
+
"FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='generic_replace', annot"
|
|
672
|
+
"ation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory=Non"
|
|
673
|
+
"e, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), Ini"
|
|
674
|
+
"tPlan.Field(name='no_marshal', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fie"
|
|
675
|
+
"lds.4.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, "
|
|
676
|
+
"validate=None, check_type=None), InitPlan.Field(name='no_unmarshal', annotation=OpRef(name='init.fields.5.anno"
|
|
677
|
+
"tation'), default=OpRef(name='init.fields.5.default'), default_factory=None, init=True, override=False, field_"
|
|
678
|
+
"type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_o"
|
|
679
|
+
"nly_params=('omit_if', 'default', 'embed', 'generic_replace', 'no_marshal', 'no_unmarshal'), frozen=True, slot"
|
|
680
|
+
"s=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='omit_if',"
|
|
681
|
+
" kw_only=True, fn=None), ReprPlan.Field(name='default', kw_only=True, fn=None), ReprPlan.Field(name='embed', k"
|
|
682
|
+
"w_only=True, fn=None), ReprPlan.Field(name='generic_replace', kw_only=True, fn=None), ReprPlan.Field(name='no_"
|
|
683
|
+
"marshal', kw_only=True, fn=None), ReprPlan.Field(name='no_unmarshal', kw_only=True, fn=None)), id=False, terse"
|
|
684
|
+
"=False, default_fn=None)))"
|
|
685
|
+
),
|
|
686
|
+
plan_repr_sha1='2c74992a67cabe7397fb3d1cc57b660ca4f1462c',
|
|
687
|
+
op_ref_idents=(
|
|
688
|
+
'__dataclass__init__fields__0__annotation',
|
|
689
|
+
'__dataclass__init__fields__0__default',
|
|
690
|
+
'__dataclass__init__fields__1__annotation',
|
|
691
|
+
'__dataclass__init__fields__1__check_type',
|
|
692
|
+
'__dataclass__init__fields__1__default',
|
|
693
|
+
'__dataclass__init__fields__2__annotation',
|
|
694
|
+
'__dataclass__init__fields__2__default',
|
|
695
|
+
'__dataclass__init__fields__3__annotation',
|
|
696
|
+
'__dataclass__init__fields__3__default',
|
|
697
|
+
'__dataclass__init__fields__4__annotation',
|
|
698
|
+
'__dataclass__init__fields__4__default',
|
|
699
|
+
'__dataclass__init__fields__5__annotation',
|
|
700
|
+
'__dataclass__init__fields__5__default',
|
|
701
|
+
),
|
|
702
|
+
cls_names=(
|
|
703
|
+
('ommlds.backends.anthropic.protocol', 'FieldOptions'),
|
|
704
|
+
),
|
|
705
|
+
)
|
|
706
|
+
def _process_dataclass__2c74992a67cabe7397fb3d1cc57b660ca4f1462c():
|
|
707
|
+
def _process_dataclass(
|
|
708
|
+
*,
|
|
709
|
+
__dataclass__cls,
|
|
710
|
+
__dataclass__init__fields__0__annotation,
|
|
711
|
+
__dataclass__init__fields__0__default,
|
|
712
|
+
__dataclass__init__fields__1__annotation,
|
|
713
|
+
__dataclass__init__fields__1__check_type,
|
|
714
|
+
__dataclass__init__fields__1__default,
|
|
715
|
+
__dataclass__init__fields__2__annotation,
|
|
716
|
+
__dataclass__init__fields__2__default,
|
|
717
|
+
__dataclass__init__fields__3__annotation,
|
|
718
|
+
__dataclass__init__fields__3__default,
|
|
719
|
+
__dataclass__init__fields__4__annotation,
|
|
720
|
+
__dataclass__init__fields__4__default,
|
|
721
|
+
__dataclass__init__fields__5__annotation,
|
|
722
|
+
__dataclass__init__fields__5__default,
|
|
723
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
724
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
725
|
+
__dataclass__FnValidationError, # noqa
|
|
726
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
727
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
728
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
729
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
730
|
+
__dataclass__None=None, # noqa
|
|
731
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
732
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
733
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
734
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
735
|
+
__dataclass__property=property, # noqa
|
|
736
|
+
):
|
|
737
|
+
def __copy__(self):
|
|
738
|
+
if self.__class__ is not __dataclass__cls:
|
|
739
|
+
raise TypeError(self)
|
|
740
|
+
return __dataclass__cls( # noqa
|
|
741
|
+
omit_if=self.omit_if,
|
|
742
|
+
default=self.default,
|
|
743
|
+
embed=self.embed,
|
|
744
|
+
generic_replace=self.generic_replace,
|
|
745
|
+
no_marshal=self.no_marshal,
|
|
746
|
+
no_unmarshal=self.no_unmarshal,
|
|
747
|
+
)
|
|
748
|
+
|
|
749
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
750
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
751
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
752
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
753
|
+
|
|
754
|
+
def __eq__(self, other):
|
|
755
|
+
if self is other:
|
|
756
|
+
return True
|
|
757
|
+
if self.__class__ is not other.__class__:
|
|
758
|
+
return NotImplemented
|
|
759
|
+
return (
|
|
760
|
+
self.omit_if == other.omit_if and
|
|
761
|
+
self.default == other.default and
|
|
762
|
+
self.embed == other.embed and
|
|
763
|
+
self.generic_replace == other.generic_replace and
|
|
764
|
+
self.no_marshal == other.no_marshal and
|
|
765
|
+
self.no_unmarshal == other.no_unmarshal
|
|
766
|
+
)
|
|
767
|
+
|
|
768
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
769
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
770
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
771
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
772
|
+
|
|
773
|
+
__dataclass___setattr_frozen_fields = {
|
|
774
|
+
'omit_if',
|
|
775
|
+
'default',
|
|
776
|
+
'embed',
|
|
777
|
+
'generic_replace',
|
|
778
|
+
'no_marshal',
|
|
779
|
+
'no_unmarshal',
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
def __setattr__(self, name, value):
|
|
783
|
+
if (
|
|
784
|
+
type(self) is __dataclass__cls
|
|
785
|
+
or name in __dataclass___setattr_frozen_fields
|
|
786
|
+
):
|
|
787
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
788
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
789
|
+
|
|
790
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
791
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
792
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
793
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
794
|
+
|
|
795
|
+
__dataclass___delattr_frozen_fields = {
|
|
796
|
+
'omit_if',
|
|
797
|
+
'default',
|
|
798
|
+
'embed',
|
|
799
|
+
'generic_replace',
|
|
800
|
+
'no_marshal',
|
|
801
|
+
'no_unmarshal',
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
def __delattr__(self, name):
|
|
805
|
+
if (
|
|
806
|
+
type(self) is __dataclass__cls
|
|
807
|
+
or name in __dataclass___delattr_frozen_fields
|
|
808
|
+
):
|
|
809
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
810
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
811
|
+
|
|
812
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
813
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
814
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
815
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
816
|
+
|
|
817
|
+
def __hash__(self):
|
|
818
|
+
return hash((
|
|
819
|
+
self.omit_if,
|
|
820
|
+
self.default,
|
|
821
|
+
self.embed,
|
|
822
|
+
self.generic_replace,
|
|
823
|
+
self.no_marshal,
|
|
824
|
+
self.no_unmarshal,
|
|
825
|
+
))
|
|
826
|
+
|
|
827
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
828
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
829
|
+
|
|
830
|
+
def __init__(
|
|
831
|
+
self,
|
|
832
|
+
*,
|
|
833
|
+
omit_if: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
834
|
+
default: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
835
|
+
embed: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
836
|
+
generic_replace: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
837
|
+
no_marshal: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
838
|
+
no_unmarshal: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
839
|
+
) -> __dataclass__None:
|
|
840
|
+
if not __dataclass__isinstance(default, __dataclass__init__fields__1__check_type):
|
|
841
|
+
raise __dataclass__FieldTypeValidationError(
|
|
842
|
+
obj=self,
|
|
843
|
+
type=__dataclass__init__fields__1__check_type,
|
|
844
|
+
field='default',
|
|
845
|
+
value=default,
|
|
846
|
+
)
|
|
847
|
+
__dataclass__object_setattr(self, 'omit_if', omit_if)
|
|
848
|
+
__dataclass__object_setattr(self, 'default', default)
|
|
849
|
+
__dataclass__object_setattr(self, 'embed', embed)
|
|
850
|
+
__dataclass__object_setattr(self, 'generic_replace', generic_replace)
|
|
851
|
+
__dataclass__object_setattr(self, 'no_marshal', no_marshal)
|
|
852
|
+
__dataclass__object_setattr(self, 'no_unmarshal', no_unmarshal)
|
|
853
|
+
|
|
854
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
855
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
856
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
857
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
858
|
+
|
|
859
|
+
@__dataclass___recursive_repr()
|
|
860
|
+
def __repr__(self):
|
|
861
|
+
parts = []
|
|
862
|
+
parts.append(f"omit_if={self.omit_if!r}")
|
|
863
|
+
parts.append(f"default={self.default!r}")
|
|
864
|
+
parts.append(f"embed={self.embed!r}")
|
|
865
|
+
parts.append(f"generic_replace={self.generic_replace!r}")
|
|
866
|
+
parts.append(f"no_marshal={self.no_marshal!r}")
|
|
867
|
+
parts.append(f"no_unmarshal={self.no_unmarshal!r}")
|
|
868
|
+
return (
|
|
869
|
+
f"{self.__class__.__qualname__}("
|
|
870
|
+
f"{', '.join(parts)}"
|
|
871
|
+
f")"
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
875
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
876
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
877
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
878
|
+
|
|
879
|
+
return _process_dataclass
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
@_register(
|
|
883
|
+
plan_repr=(
|
|
884
|
+
"Plans(tup=(CopyPlan(fields=('impls', 'tt', 'allow_partial')), EqPlan(fields=('impls', 'tt', 'allow_partial')),"
|
|
885
|
+
" FrozenPlan(fields=('impls', 'tt', 'allow_partial'), allow_dynamic_dunder_attrs=False), HashPlan(action='add',"
|
|
886
|
+
" fields=('impls', 'tt', 'allow_partial'), cache=False), InitPlan(fields=(InitPlan.Field(name='impls', annotati"
|
|
887
|
+
"on=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=False, fiel"
|
|
888
|
+
"d_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='tt', annotation="
|
|
889
|
+
"OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, ini"
|
|
890
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan."
|
|
891
|
+
"Field(name='allow_partial', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields"
|
|
892
|
+
".2.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, val"
|
|
893
|
+
"idate=None, check_type=None)), self_param='self', std_params=('impls', 'tt'), kw_only_params=('allow_partial',"
|
|
894
|
+
"), frozen=True, slots=False, post_init_params=None, init_fns=(OpRef(name='init.init_fns.0'),), validate_fns=()"
|
|
895
|
+
"), ReprPlan(fields=(ReprPlan.Field(name='impls', kw_only=False, fn=None), ReprPlan.Field(name='tt', kw_only=Fa"
|
|
896
|
+
"lse, fn=None), ReprPlan.Field(name='allow_partial', kw_only=True, fn=None)), id=False, terse=False, default_fn"
|
|
897
|
+
"=None)))"
|
|
898
|
+
),
|
|
899
|
+
plan_repr_sha1='330f034b24c077e4e7e82f9f8846225a1064a3bf',
|
|
900
|
+
op_ref_idents=(
|
|
901
|
+
'__dataclass__init__fields__0__annotation',
|
|
902
|
+
'__dataclass__init__fields__1__annotation',
|
|
903
|
+
'__dataclass__init__fields__1__default',
|
|
904
|
+
'__dataclass__init__fields__2__annotation',
|
|
905
|
+
'__dataclass__init__fields__2__default',
|
|
906
|
+
'__dataclass__init__init_fns__0',
|
|
907
|
+
),
|
|
908
|
+
cls_names=(
|
|
909
|
+
('ommlds.backends.anthropic.protocol._marshal', 'PolymorphismUnionMarshalerFactory'),
|
|
910
|
+
('ommlds.backends.anthropic.protocol._marshal', 'PolymorphismUnionUnmarshalerFactory'),
|
|
911
|
+
('ommlds.backends.anthropic.protocol._marshal', '_BasePolymorphismUnionFactory'),
|
|
912
|
+
),
|
|
913
|
+
)
|
|
914
|
+
def _process_dataclass__330f034b24c077e4e7e82f9f8846225a1064a3bf():
|
|
915
|
+
def _process_dataclass(
|
|
916
|
+
*,
|
|
917
|
+
__dataclass__cls,
|
|
918
|
+
__dataclass__init__fields__0__annotation,
|
|
919
|
+
__dataclass__init__fields__1__annotation,
|
|
920
|
+
__dataclass__init__fields__1__default,
|
|
921
|
+
__dataclass__init__fields__2__annotation,
|
|
922
|
+
__dataclass__init__fields__2__default,
|
|
923
|
+
__dataclass__init__init_fns__0,
|
|
924
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
925
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
926
|
+
__dataclass__FnValidationError, # noqa
|
|
927
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
928
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
929
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
930
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
931
|
+
__dataclass__None=None, # noqa
|
|
932
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
933
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
934
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
935
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
936
|
+
__dataclass__property=property, # noqa
|
|
937
|
+
):
|
|
938
|
+
def __copy__(self):
|
|
939
|
+
if self.__class__ is not __dataclass__cls:
|
|
940
|
+
raise TypeError(self)
|
|
941
|
+
return __dataclass__cls( # noqa
|
|
942
|
+
impls=self.impls,
|
|
943
|
+
tt=self.tt,
|
|
944
|
+
allow_partial=self.allow_partial,
|
|
945
|
+
)
|
|
946
|
+
|
|
947
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
948
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
949
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
950
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
951
|
+
|
|
952
|
+
def __eq__(self, other):
|
|
953
|
+
if self is other:
|
|
954
|
+
return True
|
|
955
|
+
if self.__class__ is not other.__class__:
|
|
956
|
+
return NotImplemented
|
|
957
|
+
return (
|
|
958
|
+
self.impls == other.impls and
|
|
959
|
+
self.tt == other.tt and
|
|
960
|
+
self.allow_partial == other.allow_partial
|
|
961
|
+
)
|
|
962
|
+
|
|
963
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
964
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
965
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
966
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
967
|
+
|
|
968
|
+
__dataclass___setattr_frozen_fields = {
|
|
969
|
+
'impls',
|
|
970
|
+
'tt',
|
|
971
|
+
'allow_partial',
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
def __setattr__(self, name, value):
|
|
975
|
+
if (
|
|
976
|
+
type(self) is __dataclass__cls
|
|
977
|
+
or name in __dataclass___setattr_frozen_fields
|
|
978
|
+
):
|
|
979
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
980
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
981
|
+
|
|
982
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
983
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
984
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
985
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
986
|
+
|
|
987
|
+
__dataclass___delattr_frozen_fields = {
|
|
988
|
+
'impls',
|
|
989
|
+
'tt',
|
|
990
|
+
'allow_partial',
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
def __delattr__(self, name):
|
|
994
|
+
if (
|
|
995
|
+
type(self) is __dataclass__cls
|
|
996
|
+
or name in __dataclass___delattr_frozen_fields
|
|
997
|
+
):
|
|
998
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
999
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1000
|
+
|
|
1001
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1002
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1003
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1004
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1005
|
+
|
|
1006
|
+
def __hash__(self):
|
|
1007
|
+
return hash((
|
|
1008
|
+
self.impls,
|
|
1009
|
+
self.tt,
|
|
1010
|
+
self.allow_partial,
|
|
1011
|
+
))
|
|
1012
|
+
|
|
1013
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1014
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1015
|
+
|
|
1016
|
+
def __init__(
|
|
1017
|
+
self,
|
|
1018
|
+
impls: __dataclass__init__fields__0__annotation,
|
|
1019
|
+
tt: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1020
|
+
*,
|
|
1021
|
+
allow_partial: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
1022
|
+
) -> __dataclass__None:
|
|
1023
|
+
__dataclass__object_setattr(self, 'impls', impls)
|
|
1024
|
+
__dataclass__object_setattr(self, 'tt', tt)
|
|
1025
|
+
__dataclass__object_setattr(self, 'allow_partial', allow_partial)
|
|
1026
|
+
__dataclass__init__init_fns__0(self)
|
|
1027
|
+
|
|
1028
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1029
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1030
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1031
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1032
|
+
|
|
1033
|
+
@__dataclass___recursive_repr()
|
|
1034
|
+
def __repr__(self):
|
|
1035
|
+
parts = []
|
|
1036
|
+
parts.append(f"impls={self.impls!r}")
|
|
1037
|
+
parts.append(f"tt={self.tt!r}")
|
|
1038
|
+
parts.append(f"allow_partial={self.allow_partial!r}")
|
|
1039
|
+
return (
|
|
1040
|
+
f"{self.__class__.__qualname__}("
|
|
1041
|
+
f"{', '.join(parts)}"
|
|
1042
|
+
f")"
|
|
1043
|
+
)
|
|
1044
|
+
|
|
1045
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1046
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1047
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1048
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1049
|
+
|
|
1050
|
+
return _process_dataclass
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
@_register(
|
|
1054
|
+
plan_repr=(
|
|
1055
|
+
"Plans(tup=(CopyPlan(fields=('field_naming', 'unknown_field', 'source_field', 'field_defaults', 'ignore_unknown"
|
|
1056
|
+
"')), EqPlan(fields=('field_naming', 'unknown_field', 'source_field', 'field_defaults', 'ignore_unknown')), Fro"
|
|
1057
|
+
"zenPlan(fields=('field_naming', 'unknown_field', 'source_field', 'field_defaults', 'ignore_unknown'), allow_dy"
|
|
1058
|
+
"namic_dunder_attrs=False), HashPlan(action='add', fields=('field_naming', 'unknown_field', 'source_field', 'fi"
|
|
1059
|
+
"eld_defaults', 'ignore_unknown'), cache=False), InitPlan(fields=(InitPlan.Field(name='field_naming', annotatio"
|
|
1060
|
+
"n=OpRef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_factory=None, i"
|
|
1061
|
+
"nit=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPla"
|
|
1062
|
+
"n.Field(name='unknown_field', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fiel"
|
|
1063
|
+
"ds.1.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, v"
|
|
1064
|
+
"alidate=None, check_type=None), InitPlan.Field(name='source_field', annotation=OpRef(name='init.fields.2.annot"
|
|
1065
|
+
"ation'), default=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_t"
|
|
1066
|
+
"ype=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='field_defaults', an"
|
|
1067
|
+
"notation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields.3.default'), default_factory="
|
|
1068
|
+
"None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), "
|
|
1069
|
+
"InitPlan.Field(name='ignore_unknown', annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='i"
|
|
1070
|
+
"nit.fields.4.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce"
|
|
1071
|
+
"=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_params=('field_naming', 'un"
|
|
1072
|
+
"known_field', 'source_field', 'field_defaults', 'ignore_unknown'), frozen=True, slots=False, post_init_params="
|
|
1073
|
+
"None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='field_naming', kw_only=True, fn=Non"
|
|
1074
|
+
"e), ReprPlan.Field(name='unknown_field', kw_only=True, fn=None), ReprPlan.Field(name='source_field', kw_only=T"
|
|
1075
|
+
"rue, fn=None), ReprPlan.Field(name='field_defaults', kw_only=True, fn=None), ReprPlan.Field(name='ignore_unkno"
|
|
1076
|
+
"wn', kw_only=True, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
1077
|
+
),
|
|
1078
|
+
plan_repr_sha1='3a02ae2ce08461319189d2ccea7ecf32459e24c3',
|
|
1079
|
+
op_ref_idents=(
|
|
1080
|
+
'__dataclass__init__fields__0__annotation',
|
|
1081
|
+
'__dataclass__init__fields__0__default',
|
|
1082
|
+
'__dataclass__init__fields__1__annotation',
|
|
1083
|
+
'__dataclass__init__fields__1__default',
|
|
1084
|
+
'__dataclass__init__fields__2__annotation',
|
|
1085
|
+
'__dataclass__init__fields__2__default',
|
|
1086
|
+
'__dataclass__init__fields__3__annotation',
|
|
1087
|
+
'__dataclass__init__fields__3__default',
|
|
1088
|
+
'__dataclass__init__fields__4__annotation',
|
|
1089
|
+
'__dataclass__init__fields__4__default',
|
|
1090
|
+
),
|
|
1091
|
+
cls_names=(
|
|
1092
|
+
('ommlds.backends.anthropic.protocol', 'ObjectMetadata'),
|
|
1093
|
+
),
|
|
1094
|
+
)
|
|
1095
|
+
def _process_dataclass__3a02ae2ce08461319189d2ccea7ecf32459e24c3():
|
|
1096
|
+
def _process_dataclass(
|
|
1097
|
+
*,
|
|
1098
|
+
__dataclass__cls,
|
|
1099
|
+
__dataclass__init__fields__0__annotation,
|
|
1100
|
+
__dataclass__init__fields__0__default,
|
|
1101
|
+
__dataclass__init__fields__1__annotation,
|
|
1102
|
+
__dataclass__init__fields__1__default,
|
|
1103
|
+
__dataclass__init__fields__2__annotation,
|
|
1104
|
+
__dataclass__init__fields__2__default,
|
|
1105
|
+
__dataclass__init__fields__3__annotation,
|
|
1106
|
+
__dataclass__init__fields__3__default,
|
|
1107
|
+
__dataclass__init__fields__4__annotation,
|
|
1108
|
+
__dataclass__init__fields__4__default,
|
|
1109
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1110
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1111
|
+
__dataclass__FnValidationError, # noqa
|
|
1112
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1113
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1114
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1115
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1116
|
+
__dataclass__None=None, # noqa
|
|
1117
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1118
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1119
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1120
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1121
|
+
__dataclass__property=property, # noqa
|
|
1122
|
+
):
|
|
1123
|
+
def __copy__(self):
|
|
1124
|
+
if self.__class__ is not __dataclass__cls:
|
|
1125
|
+
raise TypeError(self)
|
|
1126
|
+
return __dataclass__cls( # noqa
|
|
1127
|
+
field_naming=self.field_naming,
|
|
1128
|
+
unknown_field=self.unknown_field,
|
|
1129
|
+
source_field=self.source_field,
|
|
1130
|
+
field_defaults=self.field_defaults,
|
|
1131
|
+
ignore_unknown=self.ignore_unknown,
|
|
1132
|
+
)
|
|
1133
|
+
|
|
1134
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1135
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1136
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1137
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1138
|
+
|
|
1139
|
+
def __eq__(self, other):
|
|
1140
|
+
if self is other:
|
|
1141
|
+
return True
|
|
1142
|
+
if self.__class__ is not other.__class__:
|
|
1143
|
+
return NotImplemented
|
|
1144
|
+
return (
|
|
1145
|
+
self.field_naming == other.field_naming and
|
|
1146
|
+
self.unknown_field == other.unknown_field and
|
|
1147
|
+
self.source_field == other.source_field and
|
|
1148
|
+
self.field_defaults == other.field_defaults and
|
|
1149
|
+
self.ignore_unknown == other.ignore_unknown
|
|
1150
|
+
)
|
|
1151
|
+
|
|
1152
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1153
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1154
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1155
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1156
|
+
|
|
1157
|
+
__dataclass___setattr_frozen_fields = {
|
|
1158
|
+
'field_naming',
|
|
1159
|
+
'unknown_field',
|
|
1160
|
+
'source_field',
|
|
1161
|
+
'field_defaults',
|
|
1162
|
+
'ignore_unknown',
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
def __setattr__(self, name, value):
|
|
1166
|
+
if (
|
|
1167
|
+
type(self) is __dataclass__cls
|
|
1168
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1169
|
+
):
|
|
1170
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1171
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1172
|
+
|
|
1173
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1174
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1175
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1176
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1177
|
+
|
|
1178
|
+
__dataclass___delattr_frozen_fields = {
|
|
1179
|
+
'field_naming',
|
|
1180
|
+
'unknown_field',
|
|
1181
|
+
'source_field',
|
|
1182
|
+
'field_defaults',
|
|
1183
|
+
'ignore_unknown',
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
def __delattr__(self, name):
|
|
1187
|
+
if (
|
|
1188
|
+
type(self) is __dataclass__cls
|
|
1189
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1190
|
+
):
|
|
1191
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1192
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1193
|
+
|
|
1194
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1195
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1196
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1197
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1198
|
+
|
|
1199
|
+
def __hash__(self):
|
|
1200
|
+
return hash((
|
|
1201
|
+
self.field_naming,
|
|
1202
|
+
self.unknown_field,
|
|
1203
|
+
self.source_field,
|
|
1204
|
+
self.field_defaults,
|
|
1205
|
+
self.ignore_unknown,
|
|
1206
|
+
))
|
|
1207
|
+
|
|
1208
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1209
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1210
|
+
|
|
1211
|
+
def __init__(
|
|
1212
|
+
self,
|
|
1213
|
+
*,
|
|
1214
|
+
field_naming: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
1215
|
+
unknown_field: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1216
|
+
source_field: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
1217
|
+
field_defaults: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
1218
|
+
ignore_unknown: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
1219
|
+
) -> __dataclass__None:
|
|
1220
|
+
__dataclass__object_setattr(self, 'field_naming', field_naming)
|
|
1221
|
+
__dataclass__object_setattr(self, 'unknown_field', unknown_field)
|
|
1222
|
+
__dataclass__object_setattr(self, 'source_field', source_field)
|
|
1223
|
+
__dataclass__object_setattr(self, 'field_defaults', field_defaults)
|
|
1224
|
+
__dataclass__object_setattr(self, 'ignore_unknown', ignore_unknown)
|
|
1225
|
+
|
|
1226
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1227
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1228
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1229
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1230
|
+
|
|
1231
|
+
@__dataclass___recursive_repr()
|
|
1232
|
+
def __repr__(self):
|
|
1233
|
+
parts = []
|
|
1234
|
+
parts.append(f"field_naming={self.field_naming!r}")
|
|
1235
|
+
parts.append(f"unknown_field={self.unknown_field!r}")
|
|
1236
|
+
parts.append(f"source_field={self.source_field!r}")
|
|
1237
|
+
parts.append(f"field_defaults={self.field_defaults!r}")
|
|
1238
|
+
parts.append(f"ignore_unknown={self.ignore_unknown!r}")
|
|
1239
|
+
return (
|
|
1240
|
+
f"{self.__class__.__qualname__}("
|
|
1241
|
+
f"{', '.join(parts)}"
|
|
1242
|
+
f")"
|
|
1243
|
+
)
|
|
1244
|
+
|
|
1245
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1246
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1247
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1248
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1249
|
+
|
|
1250
|
+
return _process_dataclass
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
@_register(
|
|
1254
|
+
plan_repr=(
|
|
1255
|
+
"Plans(tup=(CopyPlan(fields=('m',)), EqPlan(fields=('m',)), FrozenPlan(fields=('m',), allow_dynamic_dunder_attr"
|
|
1256
|
+
"s=False), HashPlan(action='add', fields=('m',), cache=False), InitPlan(fields=(InitPlan.Field(name='m', annota"
|
|
1257
|
+
"tion=OpRef(name='init.fields.0.annotation'), default=None, default_factory=OpRef(name='init.fields.0.default_f"
|
|
1258
|
+
"actory'), init=True, override=False, field_type=FieldType.INSTANCE, coerce=OpRef(name='init.fields.0.coerce'),"
|
|
1259
|
+
" validate=None, check_type=None),), self_param='self', std_params=('m',), kw_only_params=(), frozen=True, slot"
|
|
1260
|
+
"s=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='m', kw_on"
|
|
1261
|
+
"ly=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
1262
|
+
),
|
|
1263
|
+
plan_repr_sha1='473310c5275aa58689237746102f8285e35fbee6',
|
|
1264
|
+
op_ref_idents=(
|
|
1265
|
+
'__dataclass__init__fields__0__annotation',
|
|
1266
|
+
'__dataclass__init__fields__0__coerce',
|
|
1267
|
+
'__dataclass__init__fields__0__default_factory',
|
|
1268
|
+
),
|
|
1269
|
+
cls_names=(
|
|
1270
|
+
('ommlds.backends.anthropic.protocol._marshal', 'TypeMapMarshalerFactory'),
|
|
1271
|
+
),
|
|
1272
|
+
)
|
|
1273
|
+
def _process_dataclass__473310c5275aa58689237746102f8285e35fbee6():
|
|
1274
|
+
def _process_dataclass(
|
|
1275
|
+
*,
|
|
1276
|
+
__dataclass__cls,
|
|
1277
|
+
__dataclass__init__fields__0__annotation,
|
|
1278
|
+
__dataclass__init__fields__0__coerce,
|
|
1279
|
+
__dataclass__init__fields__0__default_factory,
|
|
1280
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1281
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1282
|
+
__dataclass__FnValidationError, # noqa
|
|
1283
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1284
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1285
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1286
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1287
|
+
__dataclass__None=None, # noqa
|
|
1288
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1289
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1290
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1291
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1292
|
+
__dataclass__property=property, # noqa
|
|
1293
|
+
):
|
|
1294
|
+
def __copy__(self):
|
|
1295
|
+
if self.__class__ is not __dataclass__cls:
|
|
1296
|
+
raise TypeError(self)
|
|
1297
|
+
return __dataclass__cls( # noqa
|
|
1298
|
+
m=self.m,
|
|
1299
|
+
)
|
|
1300
|
+
|
|
1301
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1302
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1303
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1304
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1305
|
+
|
|
1306
|
+
def __eq__(self, other):
|
|
1307
|
+
if self is other:
|
|
1308
|
+
return True
|
|
1309
|
+
if self.__class__ is not other.__class__:
|
|
1310
|
+
return NotImplemented
|
|
1311
|
+
return (
|
|
1312
|
+
self.m == other.m
|
|
1313
|
+
)
|
|
1314
|
+
|
|
1315
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1316
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1317
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1318
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1319
|
+
|
|
1320
|
+
__dataclass___setattr_frozen_fields = {
|
|
1321
|
+
'm',
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
def __setattr__(self, name, value):
|
|
1325
|
+
if (
|
|
1326
|
+
type(self) is __dataclass__cls
|
|
1327
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1328
|
+
):
|
|
1329
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1330
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1331
|
+
|
|
1332
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1333
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1334
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1335
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1336
|
+
|
|
1337
|
+
__dataclass___delattr_frozen_fields = {
|
|
1338
|
+
'm',
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
def __delattr__(self, name):
|
|
1342
|
+
if (
|
|
1343
|
+
type(self) is __dataclass__cls
|
|
1344
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1345
|
+
):
|
|
1346
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1347
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1348
|
+
|
|
1349
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1350
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1351
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1352
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1353
|
+
|
|
1354
|
+
def __hash__(self):
|
|
1355
|
+
return hash((
|
|
1356
|
+
self.m,
|
|
1357
|
+
))
|
|
1358
|
+
|
|
1359
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1360
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1361
|
+
|
|
1362
|
+
def __init__(
|
|
1363
|
+
self,
|
|
1364
|
+
m: __dataclass__init__fields__0__annotation = __dataclass__HAS_DEFAULT_FACTORY,
|
|
1365
|
+
) -> __dataclass__None:
|
|
1366
|
+
if m is __dataclass__HAS_DEFAULT_FACTORY:
|
|
1367
|
+
m = __dataclass__init__fields__0__default_factory()
|
|
1368
|
+
m = __dataclass__init__fields__0__coerce(m)
|
|
1369
|
+
__dataclass__object_setattr(self, 'm', m)
|
|
1370
|
+
|
|
1371
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1372
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1373
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1374
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1375
|
+
|
|
1376
|
+
@__dataclass___recursive_repr()
|
|
1377
|
+
def __repr__(self):
|
|
1378
|
+
parts = []
|
|
1379
|
+
parts.append(f"m={self.m!r}")
|
|
1380
|
+
return (
|
|
1381
|
+
f"{self.__class__.__qualname__}("
|
|
1382
|
+
f"{', '.join(parts)}"
|
|
1383
|
+
f")"
|
|
1384
|
+
)
|
|
1385
|
+
|
|
1386
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1387
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1388
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1389
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1390
|
+
|
|
1391
|
+
return _process_dataclass
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
@_register(
|
|
1395
|
+
plan_repr=(
|
|
1396
|
+
"Plans(tup=(CopyPlan(fields=('id', 'name', 'input', 'cache_control')), EqPlan(fields=('id', 'name', 'input', 'c"
|
|
1397
|
+
"ache_control')), FrozenPlan(fields=('id', 'name', 'input', 'cache_control'), allow_dynamic_dunder_attrs=False)"
|
|
1398
|
+
", HashPlan(action='add', fields=('id', 'name', 'input', 'cache_control'), cache=False), InitPlan(fields=(InitP"
|
|
1399
|
+
"lan.Field(name='id', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, in"
|
|
1400
|
+
"it=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan"
|
|
1401
|
+
".Field(name='name', annotation=OpRef(name='init.fields.1.annotation'), default=None, default_factory=None, ini"
|
|
1402
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan."
|
|
1403
|
+
"Field(name='input', annotation=OpRef(name='init.fields.2.annotation'), default=None, default_factory=None, ini"
|
|
1404
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan."
|
|
1405
|
+
"Field(name='cache_control', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields"
|
|
1406
|
+
".3.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, val"
|
|
1407
|
+
"idate=None, check_type=None)), self_param='self', std_params=('id', 'name', 'input'), kw_only_params=('cache_c"
|
|
1408
|
+
"ontrol',), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(Re"
|
|
1409
|
+
"prPlan.Field(name='id', kw_only=False, fn=None), ReprPlan.Field(name='name', kw_only=False, fn=None), ReprPlan"
|
|
1410
|
+
".Field(name='input', kw_only=False, fn=None), ReprPlan.Field(name='cache_control', kw_only=True, fn=OpRef(name"
|
|
1411
|
+
"='repr.fns.3.fn'))), id=False, terse=False, default_fn=None)))"
|
|
1412
|
+
),
|
|
1413
|
+
plan_repr_sha1='51ac2f5bc2410c36bb667aa3a8f0ed87eb16813e',
|
|
1414
|
+
op_ref_idents=(
|
|
1415
|
+
'__dataclass__init__fields__0__annotation',
|
|
1416
|
+
'__dataclass__init__fields__1__annotation',
|
|
1417
|
+
'__dataclass__init__fields__2__annotation',
|
|
1418
|
+
'__dataclass__init__fields__3__annotation',
|
|
1419
|
+
'__dataclass__init__fields__3__default',
|
|
1420
|
+
'__dataclass__repr__fns__3__fn',
|
|
1421
|
+
),
|
|
1422
|
+
cls_names=(
|
|
1423
|
+
('ommlds.backends.anthropic.protocol', 'ToolUse'),
|
|
1424
|
+
),
|
|
1425
|
+
)
|
|
1426
|
+
def _process_dataclass__51ac2f5bc2410c36bb667aa3a8f0ed87eb16813e():
|
|
1427
|
+
def _process_dataclass(
|
|
1428
|
+
*,
|
|
1429
|
+
__dataclass__cls,
|
|
1430
|
+
__dataclass__init__fields__0__annotation,
|
|
1431
|
+
__dataclass__init__fields__1__annotation,
|
|
1432
|
+
__dataclass__init__fields__2__annotation,
|
|
1433
|
+
__dataclass__init__fields__3__annotation,
|
|
1434
|
+
__dataclass__init__fields__3__default,
|
|
1435
|
+
__dataclass__repr__fns__3__fn,
|
|
1436
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1437
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1438
|
+
__dataclass__FnValidationError, # noqa
|
|
1439
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1440
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1441
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1442
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1443
|
+
__dataclass__None=None, # noqa
|
|
1444
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1445
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1446
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1447
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1448
|
+
__dataclass__property=property, # noqa
|
|
1449
|
+
):
|
|
1450
|
+
def __copy__(self):
|
|
1451
|
+
if self.__class__ is not __dataclass__cls:
|
|
1452
|
+
raise TypeError(self)
|
|
1453
|
+
return __dataclass__cls( # noqa
|
|
1454
|
+
id=self.id,
|
|
1455
|
+
name=self.name,
|
|
1456
|
+
input=self.input,
|
|
1457
|
+
cache_control=self.cache_control,
|
|
1458
|
+
)
|
|
1459
|
+
|
|
1460
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1461
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1462
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1463
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1464
|
+
|
|
1465
|
+
def __eq__(self, other):
|
|
1466
|
+
if self is other:
|
|
1467
|
+
return True
|
|
1468
|
+
if self.__class__ is not other.__class__:
|
|
1469
|
+
return NotImplemented
|
|
1470
|
+
return (
|
|
1471
|
+
self.id == other.id and
|
|
1472
|
+
self.name == other.name and
|
|
1473
|
+
self.input == other.input and
|
|
1474
|
+
self.cache_control == other.cache_control
|
|
1475
|
+
)
|
|
1476
|
+
|
|
1477
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1478
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1479
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1480
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1481
|
+
|
|
1482
|
+
__dataclass___setattr_frozen_fields = {
|
|
1483
|
+
'id',
|
|
1484
|
+
'name',
|
|
1485
|
+
'input',
|
|
1486
|
+
'cache_control',
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
def __setattr__(self, name, value):
|
|
1490
|
+
if (
|
|
1491
|
+
type(self) is __dataclass__cls
|
|
1492
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1493
|
+
):
|
|
1494
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1495
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1496
|
+
|
|
1497
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1498
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1499
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1500
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1501
|
+
|
|
1502
|
+
__dataclass___delattr_frozen_fields = {
|
|
1503
|
+
'id',
|
|
1504
|
+
'name',
|
|
1505
|
+
'input',
|
|
1506
|
+
'cache_control',
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
def __delattr__(self, name):
|
|
1510
|
+
if (
|
|
1511
|
+
type(self) is __dataclass__cls
|
|
1512
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1513
|
+
):
|
|
1514
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1515
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1516
|
+
|
|
1517
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1518
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1519
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1520
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1521
|
+
|
|
1522
|
+
def __hash__(self):
|
|
1523
|
+
return hash((
|
|
1524
|
+
self.id,
|
|
1525
|
+
self.name,
|
|
1526
|
+
self.input,
|
|
1527
|
+
self.cache_control,
|
|
1528
|
+
))
|
|
1529
|
+
|
|
1530
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1531
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1532
|
+
|
|
1533
|
+
def __init__(
|
|
1534
|
+
self,
|
|
1535
|
+
id: __dataclass__init__fields__0__annotation,
|
|
1536
|
+
name: __dataclass__init__fields__1__annotation,
|
|
1537
|
+
input: __dataclass__init__fields__2__annotation,
|
|
1538
|
+
*,
|
|
1539
|
+
cache_control: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
1540
|
+
) -> __dataclass__None:
|
|
1541
|
+
__dataclass__object_setattr(self, 'id', id)
|
|
1542
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
1543
|
+
__dataclass__object_setattr(self, 'input', input)
|
|
1544
|
+
__dataclass__object_setattr(self, 'cache_control', cache_control)
|
|
1545
|
+
|
|
1546
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1547
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1548
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1549
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1550
|
+
|
|
1551
|
+
@__dataclass___recursive_repr()
|
|
1552
|
+
def __repr__(self):
|
|
1553
|
+
parts = []
|
|
1554
|
+
parts.append(f"id={self.id!r}")
|
|
1555
|
+
parts.append(f"name={self.name!r}")
|
|
1556
|
+
parts.append(f"input={self.input!r}")
|
|
1557
|
+
if (s := __dataclass__repr__fns__3__fn(self.cache_control)) is not None:
|
|
1558
|
+
parts.append(f"cache_control={s}")
|
|
1559
|
+
return (
|
|
1560
|
+
f"{self.__class__.__qualname__}("
|
|
1561
|
+
f"{', '.join(parts)}"
|
|
1562
|
+
f")"
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1566
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1567
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1568
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1569
|
+
|
|
1570
|
+
return _process_dataclass
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
@_register(
|
|
1574
|
+
plan_repr=(
|
|
1575
|
+
"Plans(tup=(CopyPlan(fields=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options')), EqPlan"
|
|
1576
|
+
"(fields=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options')), FrozenPlan(fields=('name'"
|
|
1577
|
+
", 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options'), allow_dynamic_dunder_attrs=False), HashPl"
|
|
1578
|
+
"an(action='add', fields=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'options'), cache=Fals"
|
|
1579
|
+
"e), InitPlan(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), default=No"
|
|
1580
|
+
"ne, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None"
|
|
1581
|
+
", check_type=None), InitPlan.Field(name='type', annotation=OpRef(name='init.fields.1.annotation'), default=Non"
|
|
1582
|
+
"e, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None,"
|
|
1583
|
+
" check_type=None), InitPlan.Field(name='marshal_name', annotation=OpRef(name='init.fields.2.annotation'), defa"
|
|
1584
|
+
"ult=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validat"
|
|
1585
|
+
"e=None, check_type=None), InitPlan.Field(name='unmarshal_names', annotation=OpRef(name='init.fields.3.annotati"
|
|
1586
|
+
"on'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=Non"
|
|
1587
|
+
"e, validate=None, check_type=None), InitPlan.Field(name='metadata', annotation=OpRef(name='init.fields.4.annot"
|
|
1588
|
+
"ation'), default=OpRef(name='init.fields.4.default'), default_factory=None, init=True, override=False, field_t"
|
|
1589
|
+
"ype=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='options', annotatio"
|
|
1590
|
+
"n=OpRef(name='init.fields.5.annotation'), default=OpRef(name='init.fields.5.default'), default_factory=None, i"
|
|
1591
|
+
"nit=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_p"
|
|
1592
|
+
"aram='self', std_params=(), kw_only_params=('name', 'type', 'marshal_name', 'unmarshal_names', 'metadata', 'op"
|
|
1593
|
+
"tions'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(Repr"
|
|
1594
|
+
"Plan.Field(name='name', kw_only=True, fn=None), ReprPlan.Field(name='type', kw_only=True, fn=None), ReprPlan.F"
|
|
1595
|
+
"ield(name='marshal_name', kw_only=True, fn=None), ReprPlan.Field(name='unmarshal_names', kw_only=True, fn=None"
|
|
1596
|
+
"), ReprPlan.Field(name='metadata', kw_only=True, fn=None), ReprPlan.Field(name='options', kw_only=True, fn=Non"
|
|
1597
|
+
"e)), id=False, terse=False, default_fn=None)))"
|
|
1598
|
+
),
|
|
1599
|
+
plan_repr_sha1='52efba591171513abf94b0833a0c230d4abd829e',
|
|
1600
|
+
op_ref_idents=(
|
|
1601
|
+
'__dataclass__init__fields__0__annotation',
|
|
1602
|
+
'__dataclass__init__fields__1__annotation',
|
|
1603
|
+
'__dataclass__init__fields__2__annotation',
|
|
1604
|
+
'__dataclass__init__fields__3__annotation',
|
|
1605
|
+
'__dataclass__init__fields__4__annotation',
|
|
1606
|
+
'__dataclass__init__fields__4__default',
|
|
1607
|
+
'__dataclass__init__fields__5__annotation',
|
|
1608
|
+
'__dataclass__init__fields__5__default',
|
|
1609
|
+
),
|
|
1610
|
+
cls_names=(
|
|
1611
|
+
('ommlds.backends.anthropic.protocol', 'FieldInfo'),
|
|
1612
|
+
),
|
|
1613
|
+
)
|
|
1614
|
+
def _process_dataclass__52efba591171513abf94b0833a0c230d4abd829e():
|
|
1615
|
+
def _process_dataclass(
|
|
1616
|
+
*,
|
|
1617
|
+
__dataclass__cls,
|
|
1618
|
+
__dataclass__init__fields__0__annotation,
|
|
1619
|
+
__dataclass__init__fields__1__annotation,
|
|
1620
|
+
__dataclass__init__fields__2__annotation,
|
|
1621
|
+
__dataclass__init__fields__3__annotation,
|
|
1622
|
+
__dataclass__init__fields__4__annotation,
|
|
1623
|
+
__dataclass__init__fields__4__default,
|
|
1624
|
+
__dataclass__init__fields__5__annotation,
|
|
1625
|
+
__dataclass__init__fields__5__default,
|
|
1626
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1627
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1628
|
+
__dataclass__FnValidationError, # noqa
|
|
1629
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1630
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1631
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1632
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1633
|
+
__dataclass__None=None, # noqa
|
|
1634
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1635
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1636
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1637
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1638
|
+
__dataclass__property=property, # noqa
|
|
1639
|
+
):
|
|
1640
|
+
def __copy__(self):
|
|
1641
|
+
if self.__class__ is not __dataclass__cls:
|
|
1642
|
+
raise TypeError(self)
|
|
1643
|
+
return __dataclass__cls( # noqa
|
|
1644
|
+
name=self.name,
|
|
1645
|
+
type=self.type,
|
|
1646
|
+
marshal_name=self.marshal_name,
|
|
1647
|
+
unmarshal_names=self.unmarshal_names,
|
|
1648
|
+
metadata=self.metadata,
|
|
1649
|
+
options=self.options,
|
|
1650
|
+
)
|
|
1651
|
+
|
|
1652
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1653
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1654
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1655
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1656
|
+
|
|
1657
|
+
def __eq__(self, other):
|
|
1658
|
+
if self is other:
|
|
1659
|
+
return True
|
|
1660
|
+
if self.__class__ is not other.__class__:
|
|
1661
|
+
return NotImplemented
|
|
1662
|
+
return (
|
|
1663
|
+
self.name == other.name and
|
|
1664
|
+
self.type == other.type and
|
|
1665
|
+
self.marshal_name == other.marshal_name and
|
|
1666
|
+
self.unmarshal_names == other.unmarshal_names and
|
|
1667
|
+
self.metadata == other.metadata and
|
|
1668
|
+
self.options == other.options
|
|
1669
|
+
)
|
|
1670
|
+
|
|
1671
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1672
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1673
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1674
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1675
|
+
|
|
1676
|
+
__dataclass___setattr_frozen_fields = {
|
|
1677
|
+
'name',
|
|
1678
|
+
'type',
|
|
1679
|
+
'marshal_name',
|
|
1680
|
+
'unmarshal_names',
|
|
1681
|
+
'metadata',
|
|
1682
|
+
'options',
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
def __setattr__(self, name, value):
|
|
1686
|
+
if (
|
|
1687
|
+
type(self) is __dataclass__cls
|
|
1688
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1689
|
+
):
|
|
1690
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1691
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1692
|
+
|
|
1693
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1694
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1695
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1696
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1697
|
+
|
|
1698
|
+
__dataclass___delattr_frozen_fields = {
|
|
1699
|
+
'name',
|
|
1700
|
+
'type',
|
|
1701
|
+
'marshal_name',
|
|
1702
|
+
'unmarshal_names',
|
|
1703
|
+
'metadata',
|
|
1704
|
+
'options',
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
def __delattr__(self, name):
|
|
1708
|
+
if (
|
|
1709
|
+
type(self) is __dataclass__cls
|
|
1710
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1711
|
+
):
|
|
1712
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1713
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1714
|
+
|
|
1715
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1716
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1717
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1718
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1719
|
+
|
|
1720
|
+
def __hash__(self):
|
|
1721
|
+
return hash((
|
|
1722
|
+
self.name,
|
|
1723
|
+
self.type,
|
|
1724
|
+
self.marshal_name,
|
|
1725
|
+
self.unmarshal_names,
|
|
1726
|
+
self.metadata,
|
|
1727
|
+
self.options,
|
|
1728
|
+
))
|
|
1729
|
+
|
|
1730
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1731
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1732
|
+
|
|
1733
|
+
def __init__(
|
|
1734
|
+
self,
|
|
1735
|
+
*,
|
|
1736
|
+
name: __dataclass__init__fields__0__annotation,
|
|
1737
|
+
type: __dataclass__init__fields__1__annotation,
|
|
1738
|
+
marshal_name: __dataclass__init__fields__2__annotation,
|
|
1739
|
+
unmarshal_names: __dataclass__init__fields__3__annotation,
|
|
1740
|
+
metadata: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
1741
|
+
options: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
1742
|
+
) -> __dataclass__None:
|
|
1743
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
1744
|
+
__dataclass__object_setattr(self, 'type', type)
|
|
1745
|
+
__dataclass__object_setattr(self, 'marshal_name', marshal_name)
|
|
1746
|
+
__dataclass__object_setattr(self, 'unmarshal_names', unmarshal_names)
|
|
1747
|
+
__dataclass__object_setattr(self, 'metadata', metadata)
|
|
1748
|
+
__dataclass__object_setattr(self, 'options', options)
|
|
1749
|
+
|
|
1750
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1751
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1752
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1753
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1754
|
+
|
|
1755
|
+
@__dataclass___recursive_repr()
|
|
1756
|
+
def __repr__(self):
|
|
1757
|
+
parts = []
|
|
1758
|
+
parts.append(f"name={self.name!r}")
|
|
1759
|
+
parts.append(f"type={self.type!r}")
|
|
1760
|
+
parts.append(f"marshal_name={self.marshal_name!r}")
|
|
1761
|
+
parts.append(f"unmarshal_names={self.unmarshal_names!r}")
|
|
1762
|
+
parts.append(f"metadata={self.metadata!r}")
|
|
1763
|
+
parts.append(f"options={self.options!r}")
|
|
1764
|
+
return (
|
|
1765
|
+
f"{self.__class__.__qualname__}("
|
|
1766
|
+
f"{', '.join(parts)}"
|
|
1767
|
+
f")"
|
|
1768
|
+
)
|
|
1769
|
+
|
|
1770
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1771
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1772
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1773
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1774
|
+
|
|
1775
|
+
return _process_dataclass
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
@_register(
|
|
1779
|
+
plan_repr=(
|
|
1780
|
+
"Plans(tup=(CopyPlan(fields=('ephemeral_5m_input_tokens', 'ephemeral_1h_input_tokens')), EqPlan(fields=('epheme"
|
|
1781
|
+
"ral_5m_input_tokens', 'ephemeral_1h_input_tokens')), FrozenPlan(fields=('ephemeral_5m_input_tokens', 'ephemera"
|
|
1782
|
+
"l_1h_input_tokens'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('ephemeral_5m_input_tok"
|
|
1783
|
+
"ens', 'ephemeral_1h_input_tokens'), cache=False), InitPlan(fields=(InitPlan.Field(name='ephemeral_5m_input_tok"
|
|
1784
|
+
"ens', annotation=OpRef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_"
|
|
1785
|
+
"factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type"
|
|
1786
|
+
"=None), InitPlan.Field(name='ephemeral_1h_input_tokens', annotation=OpRef(name='init.fields.1.annotation'), de"
|
|
1787
|
+
"fault=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_type=FieldTy"
|
|
1788
|
+
"pe.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_params=("
|
|
1789
|
+
"'ephemeral_5m_input_tokens', 'ephemeral_1h_input_tokens'), frozen=True, slots=False, post_init_params=None, in"
|
|
1790
|
+
"it_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='ephemeral_5m_input_tokens', kw_only=True, f"
|
|
1791
|
+
"n=None), ReprPlan.Field(name='ephemeral_1h_input_tokens', kw_only=True, fn=None)), id=False, terse=False, defa"
|
|
1792
|
+
"ult_fn=None)))"
|
|
1793
|
+
),
|
|
1794
|
+
plan_repr_sha1='5c5ca30d2c7c7eb47b5926b664cd0fabb3279da5',
|
|
1795
|
+
op_ref_idents=(
|
|
1796
|
+
'__dataclass__init__fields__0__annotation',
|
|
1797
|
+
'__dataclass__init__fields__0__default',
|
|
1798
|
+
'__dataclass__init__fields__1__annotation',
|
|
1799
|
+
'__dataclass__init__fields__1__default',
|
|
1800
|
+
),
|
|
1801
|
+
cls_names=(
|
|
1802
|
+
('ommlds.backends.anthropic.protocol', 'CacheCreation'),
|
|
1803
|
+
),
|
|
1804
|
+
)
|
|
1805
|
+
def _process_dataclass__5c5ca30d2c7c7eb47b5926b664cd0fabb3279da5():
|
|
1806
|
+
def _process_dataclass(
|
|
1807
|
+
*,
|
|
1808
|
+
__dataclass__cls,
|
|
1809
|
+
__dataclass__init__fields__0__annotation,
|
|
1810
|
+
__dataclass__init__fields__0__default,
|
|
1811
|
+
__dataclass__init__fields__1__annotation,
|
|
1812
|
+
__dataclass__init__fields__1__default,
|
|
1813
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1814
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1815
|
+
__dataclass__FnValidationError, # noqa
|
|
1816
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1817
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1818
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1819
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1820
|
+
__dataclass__None=None, # noqa
|
|
1821
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1822
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1823
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1824
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1825
|
+
__dataclass__property=property, # noqa
|
|
1826
|
+
):
|
|
1827
|
+
def __copy__(self):
|
|
1828
|
+
if self.__class__ is not __dataclass__cls:
|
|
1829
|
+
raise TypeError(self)
|
|
1830
|
+
return __dataclass__cls( # noqa
|
|
1831
|
+
ephemeral_5m_input_tokens=self.ephemeral_5m_input_tokens,
|
|
1832
|
+
ephemeral_1h_input_tokens=self.ephemeral_1h_input_tokens,
|
|
1833
|
+
)
|
|
1834
|
+
|
|
1835
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1836
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1837
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1838
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1839
|
+
|
|
1840
|
+
def __eq__(self, other):
|
|
1841
|
+
if self is other:
|
|
1842
|
+
return True
|
|
1843
|
+
if self.__class__ is not other.__class__:
|
|
1844
|
+
return NotImplemented
|
|
1845
|
+
return (
|
|
1846
|
+
self.ephemeral_5m_input_tokens == other.ephemeral_5m_input_tokens and
|
|
1847
|
+
self.ephemeral_1h_input_tokens == other.ephemeral_1h_input_tokens
|
|
1848
|
+
)
|
|
1849
|
+
|
|
1850
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1851
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1852
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1853
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1854
|
+
|
|
1855
|
+
__dataclass___setattr_frozen_fields = {
|
|
1856
|
+
'ephemeral_5m_input_tokens',
|
|
1857
|
+
'ephemeral_1h_input_tokens',
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
def __setattr__(self, name, value):
|
|
1861
|
+
if (
|
|
1862
|
+
type(self) is __dataclass__cls
|
|
1863
|
+
or name in __dataclass___setattr_frozen_fields
|
|
1864
|
+
):
|
|
1865
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
1866
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
1867
|
+
|
|
1868
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
1869
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
1870
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
1871
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
1872
|
+
|
|
1873
|
+
__dataclass___delattr_frozen_fields = {
|
|
1874
|
+
'ephemeral_5m_input_tokens',
|
|
1875
|
+
'ephemeral_1h_input_tokens',
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
def __delattr__(self, name):
|
|
1879
|
+
if (
|
|
1880
|
+
type(self) is __dataclass__cls
|
|
1881
|
+
or name in __dataclass___delattr_frozen_fields
|
|
1882
|
+
):
|
|
1883
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
1884
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
1885
|
+
|
|
1886
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
1887
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
1888
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
1889
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
1890
|
+
|
|
1891
|
+
def __hash__(self):
|
|
1892
|
+
return hash((
|
|
1893
|
+
self.ephemeral_5m_input_tokens,
|
|
1894
|
+
self.ephemeral_1h_input_tokens,
|
|
1895
|
+
))
|
|
1896
|
+
|
|
1897
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
1898
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
1899
|
+
|
|
1900
|
+
def __init__(
|
|
1901
|
+
self,
|
|
1902
|
+
*,
|
|
1903
|
+
ephemeral_5m_input_tokens: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
1904
|
+
ephemeral_1h_input_tokens: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
1905
|
+
) -> __dataclass__None:
|
|
1906
|
+
__dataclass__object_setattr(self, 'ephemeral_5m_input_tokens', ephemeral_5m_input_tokens)
|
|
1907
|
+
__dataclass__object_setattr(self, 'ephemeral_1h_input_tokens', ephemeral_1h_input_tokens)
|
|
1908
|
+
|
|
1909
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
1910
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
1911
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
1912
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
1913
|
+
|
|
1914
|
+
@__dataclass___recursive_repr()
|
|
1915
|
+
def __repr__(self):
|
|
1916
|
+
parts = []
|
|
1917
|
+
parts.append(f"ephemeral_5m_input_tokens={self.ephemeral_5m_input_tokens!r}")
|
|
1918
|
+
parts.append(f"ephemeral_1h_input_tokens={self.ephemeral_1h_input_tokens!r}")
|
|
1919
|
+
return (
|
|
1920
|
+
f"{self.__class__.__qualname__}("
|
|
1921
|
+
f"{', '.join(parts)}"
|
|
1922
|
+
f")"
|
|
1923
|
+
)
|
|
1924
|
+
|
|
1925
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
1926
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
1927
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
1928
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
1929
|
+
|
|
1930
|
+
return _process_dataclass
|
|
1931
|
+
|
|
1932
|
+
|
|
1933
|
+
@_register(
|
|
1934
|
+
plan_repr=(
|
|
1935
|
+
"Plans(tup=(CopyPlan(fields=('ty',)), EqPlan(fields=('ty',)), FrozenPlan(fields=('ty',), allow_dynamic_dunder_a"
|
|
1936
|
+
"ttrs=False), HashPlan(action='add', fields=('ty',), cache=False), InitPlan(fields=(InitPlan.Field(name='ty', a"
|
|
1937
|
+
"nnotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=Fals"
|
|
1938
|
+
"e, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self', std_param"
|
|
1939
|
+
"s=('ty',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), "
|
|
1940
|
+
"ReprPlan(fields=(ReprPlan.Field(name='ty', kw_only=False, fn=None),), id=False, terse=False, default_fn=None))"
|
|
1941
|
+
")"
|
|
1942
|
+
),
|
|
1943
|
+
plan_repr_sha1='5fb811b6a8837cb3b84359f812a39e560d257d5f',
|
|
1944
|
+
op_ref_idents=(
|
|
1945
|
+
'__dataclass__init__fields__0__annotation',
|
|
1946
|
+
),
|
|
1947
|
+
cls_names=(
|
|
1948
|
+
('ommlds.backends.anthropic.protocol._marshal', 'PrimitiveMarshalerUnmarshaler'),
|
|
1949
|
+
),
|
|
1950
|
+
)
|
|
1951
|
+
def _process_dataclass__5fb811b6a8837cb3b84359f812a39e560d257d5f():
|
|
1952
|
+
def _process_dataclass(
|
|
1953
|
+
*,
|
|
1954
|
+
__dataclass__cls,
|
|
1955
|
+
__dataclass__init__fields__0__annotation,
|
|
1956
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
1957
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
1958
|
+
__dataclass__FnValidationError, # noqa
|
|
1959
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
1960
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
1961
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
1962
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
1963
|
+
__dataclass__None=None, # noqa
|
|
1964
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
1965
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
1966
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
1967
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
1968
|
+
__dataclass__property=property, # noqa
|
|
1969
|
+
):
|
|
1970
|
+
def __copy__(self):
|
|
1971
|
+
if self.__class__ is not __dataclass__cls:
|
|
1972
|
+
raise TypeError(self)
|
|
1973
|
+
return __dataclass__cls( # noqa
|
|
1974
|
+
ty=self.ty,
|
|
1975
|
+
)
|
|
1976
|
+
|
|
1977
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
1978
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
1979
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
1980
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
1981
|
+
|
|
1982
|
+
def __eq__(self, other):
|
|
1983
|
+
if self is other:
|
|
1984
|
+
return True
|
|
1985
|
+
if self.__class__ is not other.__class__:
|
|
1986
|
+
return NotImplemented
|
|
1987
|
+
return (
|
|
1988
|
+
self.ty == other.ty
|
|
1989
|
+
)
|
|
1990
|
+
|
|
1991
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
1992
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
1993
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
1994
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
1995
|
+
|
|
1996
|
+
__dataclass___setattr_frozen_fields = {
|
|
1997
|
+
'ty',
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
def __setattr__(self, name, value):
|
|
2001
|
+
if (
|
|
2002
|
+
type(self) is __dataclass__cls
|
|
2003
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2004
|
+
):
|
|
2005
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2006
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2007
|
+
|
|
2008
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2009
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2010
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2011
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2012
|
+
|
|
2013
|
+
__dataclass___delattr_frozen_fields = {
|
|
2014
|
+
'ty',
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
def __delattr__(self, name):
|
|
2018
|
+
if (
|
|
2019
|
+
type(self) is __dataclass__cls
|
|
2020
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2021
|
+
):
|
|
2022
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2023
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2024
|
+
|
|
2025
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2026
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2027
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2028
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2029
|
+
|
|
2030
|
+
def __hash__(self):
|
|
2031
|
+
return hash((
|
|
2032
|
+
self.ty,
|
|
2033
|
+
))
|
|
2034
|
+
|
|
2035
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2036
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2037
|
+
|
|
2038
|
+
def __init__(
|
|
2039
|
+
self,
|
|
2040
|
+
ty: __dataclass__init__fields__0__annotation,
|
|
2041
|
+
) -> __dataclass__None:
|
|
2042
|
+
__dataclass__object_setattr(self, 'ty', ty)
|
|
2043
|
+
|
|
2044
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2045
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2046
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2047
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2048
|
+
|
|
2049
|
+
@__dataclass___recursive_repr()
|
|
2050
|
+
def __repr__(self):
|
|
2051
|
+
parts = []
|
|
2052
|
+
parts.append(f"ty={self.ty!r}")
|
|
2053
|
+
return (
|
|
2054
|
+
f"{self.__class__.__qualname__}("
|
|
2055
|
+
f"{', '.join(parts)}"
|
|
2056
|
+
f")"
|
|
2057
|
+
)
|
|
2058
|
+
|
|
2059
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2060
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2061
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2062
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2063
|
+
|
|
2064
|
+
return _process_dataclass
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
@_register(
|
|
2068
|
+
plan_repr=(
|
|
2069
|
+
"Plans(tup=(CopyPlan(fields=('text', 'cache_control')), EqPlan(fields=('text', 'cache_control')), FrozenPlan(fi"
|
|
2070
|
+
"elds=('text', 'cache_control'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('text', 'cac"
|
|
2071
|
+
"he_control'), cache=False), InitPlan(fields=(InitPlan.Field(name='text', annotation=OpRef(name='init.fields.0."
|
|
2072
|
+
"annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, co"
|
|
2073
|
+
"erce=None, validate=None, check_type=None), InitPlan.Field(name='cache_control', annotation=OpRef(name='init.f"
|
|
2074
|
+
"ields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=F"
|
|
2075
|
+
"alse, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_par"
|
|
2076
|
+
"ams=('text',), kw_only_params=('cache_control',), frozen=True, slots=False, post_init_params=None, init_fns=()"
|
|
2077
|
+
", validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='text', kw_only=False, fn=None), ReprPlan.Field(name="
|
|
2078
|
+
"'cache_control', kw_only=True, fn=OpRef(name='repr.fns.1.fn'))), id=False, terse=False, default_fn=None)))"
|
|
2079
|
+
),
|
|
2080
|
+
plan_repr_sha1='75e01105e84631f3c02c90f25368d746f1826680',
|
|
2081
|
+
op_ref_idents=(
|
|
2082
|
+
'__dataclass__init__fields__0__annotation',
|
|
2083
|
+
'__dataclass__init__fields__1__annotation',
|
|
2084
|
+
'__dataclass__init__fields__1__default',
|
|
2085
|
+
'__dataclass__repr__fns__1__fn',
|
|
2086
|
+
),
|
|
2087
|
+
cls_names=(
|
|
2088
|
+
('ommlds.backends.anthropic.protocol', 'Text'),
|
|
2089
|
+
),
|
|
2090
|
+
)
|
|
2091
|
+
def _process_dataclass__75e01105e84631f3c02c90f25368d746f1826680():
|
|
2092
|
+
def _process_dataclass(
|
|
2093
|
+
*,
|
|
2094
|
+
__dataclass__cls,
|
|
2095
|
+
__dataclass__init__fields__0__annotation,
|
|
2096
|
+
__dataclass__init__fields__1__annotation,
|
|
2097
|
+
__dataclass__init__fields__1__default,
|
|
2098
|
+
__dataclass__repr__fns__1__fn,
|
|
2099
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2100
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2101
|
+
__dataclass__FnValidationError, # noqa
|
|
2102
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2103
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2104
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2105
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2106
|
+
__dataclass__None=None, # noqa
|
|
2107
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2108
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2109
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2110
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2111
|
+
__dataclass__property=property, # noqa
|
|
2112
|
+
):
|
|
2113
|
+
def __copy__(self):
|
|
2114
|
+
if self.__class__ is not __dataclass__cls:
|
|
2115
|
+
raise TypeError(self)
|
|
2116
|
+
return __dataclass__cls( # noqa
|
|
2117
|
+
text=self.text,
|
|
2118
|
+
cache_control=self.cache_control,
|
|
2119
|
+
)
|
|
2120
|
+
|
|
2121
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2122
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2123
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2124
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2125
|
+
|
|
2126
|
+
def __eq__(self, other):
|
|
2127
|
+
if self is other:
|
|
2128
|
+
return True
|
|
2129
|
+
if self.__class__ is not other.__class__:
|
|
2130
|
+
return NotImplemented
|
|
2131
|
+
return (
|
|
2132
|
+
self.text == other.text and
|
|
2133
|
+
self.cache_control == other.cache_control
|
|
2134
|
+
)
|
|
2135
|
+
|
|
2136
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2137
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2138
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2139
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2140
|
+
|
|
2141
|
+
__dataclass___setattr_frozen_fields = {
|
|
2142
|
+
'text',
|
|
2143
|
+
'cache_control',
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
def __setattr__(self, name, value):
|
|
2147
|
+
if (
|
|
2148
|
+
type(self) is __dataclass__cls
|
|
2149
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2150
|
+
):
|
|
2151
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2152
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2153
|
+
|
|
2154
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2155
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2156
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2157
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2158
|
+
|
|
2159
|
+
__dataclass___delattr_frozen_fields = {
|
|
2160
|
+
'text',
|
|
2161
|
+
'cache_control',
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
def __delattr__(self, name):
|
|
2165
|
+
if (
|
|
2166
|
+
type(self) is __dataclass__cls
|
|
2167
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2168
|
+
):
|
|
2169
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2170
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2171
|
+
|
|
2172
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2173
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2174
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2175
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2176
|
+
|
|
2177
|
+
def __hash__(self):
|
|
2178
|
+
return hash((
|
|
2179
|
+
self.text,
|
|
2180
|
+
self.cache_control,
|
|
2181
|
+
))
|
|
2182
|
+
|
|
2183
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2184
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2185
|
+
|
|
2186
|
+
def __init__(
|
|
2187
|
+
self,
|
|
2188
|
+
text: __dataclass__init__fields__0__annotation,
|
|
2189
|
+
*,
|
|
2190
|
+
cache_control: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
2191
|
+
) -> __dataclass__None:
|
|
2192
|
+
__dataclass__object_setattr(self, 'text', text)
|
|
2193
|
+
__dataclass__object_setattr(self, 'cache_control', cache_control)
|
|
2194
|
+
|
|
2195
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2196
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2197
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2198
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2199
|
+
|
|
2200
|
+
@__dataclass___recursive_repr()
|
|
2201
|
+
def __repr__(self):
|
|
2202
|
+
parts = []
|
|
2203
|
+
parts.append(f"text={self.text!r}")
|
|
2204
|
+
if (s := __dataclass__repr__fns__1__fn(self.cache_control)) is not None:
|
|
2205
|
+
parts.append(f"cache_control={s}")
|
|
2206
|
+
return (
|
|
2207
|
+
f"{self.__class__.__qualname__}("
|
|
2208
|
+
f"{', '.join(parts)}"
|
|
2209
|
+
f")"
|
|
2210
|
+
)
|
|
2211
|
+
|
|
2212
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2213
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2214
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2215
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2216
|
+
|
|
2217
|
+
return _process_dataclass
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
@_register(
|
|
2221
|
+
plan_repr=(
|
|
2222
|
+
"Plans(tup=(CopyPlan(fields=('fields', 'specials', 'attr_getter')), EqPlan(fields=('fields', 'specials', 'attr_"
|
|
2223
|
+
"getter')), FrozenPlan(fields=('fields', 'specials', 'attr_getter'), allow_dynamic_dunder_attrs=False), HashPla"
|
|
2224
|
+
"n(action='add', fields=('fields', 'specials', 'attr_getter'), cache=False), InitPlan(fields=(InitPlan.Field(na"
|
|
2225
|
+
"me='fields', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True,"
|
|
2226
|
+
" override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(n"
|
|
2227
|
+
"ame='specials', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default')"
|
|
2228
|
+
", default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, "
|
|
2229
|
+
"check_type=None), InitPlan.Field(name='attr_getter', annotation=OpRef(name='init.fields.2.annotation'), defaul"
|
|
2230
|
+
"t=OpRef(name='init.fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.I"
|
|
2231
|
+
"NSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('fields',), kw_only_par"
|
|
2232
|
+
"ams=('specials', 'attr_getter'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()"
|
|
2233
|
+
"), ReprPlan(fields=(ReprPlan.Field(name='fields', kw_only=False, fn=None), ReprPlan.Field(name='specials', kw_"
|
|
2234
|
+
"only=True, fn=None), ReprPlan.Field(name='attr_getter', kw_only=True, fn=None)), id=False, terse=False, defaul"
|
|
2235
|
+
"t_fn=None)))"
|
|
2236
|
+
),
|
|
2237
|
+
plan_repr_sha1='8efaa231a8242879f7cbb39c769901e1908abe12',
|
|
2238
|
+
op_ref_idents=(
|
|
2239
|
+
'__dataclass__init__fields__0__annotation',
|
|
2240
|
+
'__dataclass__init__fields__1__annotation',
|
|
2241
|
+
'__dataclass__init__fields__1__default',
|
|
2242
|
+
'__dataclass__init__fields__2__annotation',
|
|
2243
|
+
'__dataclass__init__fields__2__default',
|
|
2244
|
+
),
|
|
2245
|
+
cls_names=(
|
|
2246
|
+
('ommlds.backends.anthropic.protocol._marshal', 'ObjectMarshaler'),
|
|
2247
|
+
),
|
|
2248
|
+
)
|
|
2249
|
+
def _process_dataclass__8efaa231a8242879f7cbb39c769901e1908abe12():
|
|
2250
|
+
def _process_dataclass(
|
|
2251
|
+
*,
|
|
2252
|
+
__dataclass__cls,
|
|
2253
|
+
__dataclass__init__fields__0__annotation,
|
|
2254
|
+
__dataclass__init__fields__1__annotation,
|
|
2255
|
+
__dataclass__init__fields__1__default,
|
|
2256
|
+
__dataclass__init__fields__2__annotation,
|
|
2257
|
+
__dataclass__init__fields__2__default,
|
|
2258
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2259
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2260
|
+
__dataclass__FnValidationError, # noqa
|
|
2261
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2262
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2263
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2264
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2265
|
+
__dataclass__None=None, # noqa
|
|
2266
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2267
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2268
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2269
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2270
|
+
__dataclass__property=property, # noqa
|
|
2271
|
+
):
|
|
2272
|
+
def __copy__(self):
|
|
2273
|
+
if self.__class__ is not __dataclass__cls:
|
|
2274
|
+
raise TypeError(self)
|
|
2275
|
+
return __dataclass__cls( # noqa
|
|
2276
|
+
fields=self.fields,
|
|
2277
|
+
specials=self.specials,
|
|
2278
|
+
attr_getter=self.attr_getter,
|
|
2279
|
+
)
|
|
2280
|
+
|
|
2281
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2282
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2283
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2284
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2285
|
+
|
|
2286
|
+
def __eq__(self, other):
|
|
2287
|
+
if self is other:
|
|
2288
|
+
return True
|
|
2289
|
+
if self.__class__ is not other.__class__:
|
|
2290
|
+
return NotImplemented
|
|
2291
|
+
return (
|
|
2292
|
+
self.fields == other.fields and
|
|
2293
|
+
self.specials == other.specials and
|
|
2294
|
+
self.attr_getter == other.attr_getter
|
|
2295
|
+
)
|
|
2296
|
+
|
|
2297
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2298
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2299
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2300
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2301
|
+
|
|
2302
|
+
__dataclass___setattr_frozen_fields = {
|
|
2303
|
+
'fields',
|
|
2304
|
+
'specials',
|
|
2305
|
+
'attr_getter',
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
def __setattr__(self, name, value):
|
|
2309
|
+
if (
|
|
2310
|
+
type(self) is __dataclass__cls
|
|
2311
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2312
|
+
):
|
|
2313
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2314
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2315
|
+
|
|
2316
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2317
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2318
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2319
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2320
|
+
|
|
2321
|
+
__dataclass___delattr_frozen_fields = {
|
|
2322
|
+
'fields',
|
|
2323
|
+
'specials',
|
|
2324
|
+
'attr_getter',
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
def __delattr__(self, name):
|
|
2328
|
+
if (
|
|
2329
|
+
type(self) is __dataclass__cls
|
|
2330
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2331
|
+
):
|
|
2332
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2333
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2334
|
+
|
|
2335
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2336
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2337
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2338
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2339
|
+
|
|
2340
|
+
def __hash__(self):
|
|
2341
|
+
return hash((
|
|
2342
|
+
self.fields,
|
|
2343
|
+
self.specials,
|
|
2344
|
+
self.attr_getter,
|
|
2345
|
+
))
|
|
2346
|
+
|
|
2347
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2348
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2349
|
+
|
|
2350
|
+
def __init__(
|
|
2351
|
+
self,
|
|
2352
|
+
fields: __dataclass__init__fields__0__annotation,
|
|
2353
|
+
*,
|
|
2354
|
+
specials: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
2355
|
+
attr_getter: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
2356
|
+
) -> __dataclass__None:
|
|
2357
|
+
__dataclass__object_setattr(self, 'fields', fields)
|
|
2358
|
+
__dataclass__object_setattr(self, 'specials', specials)
|
|
2359
|
+
__dataclass__object_setattr(self, 'attr_getter', attr_getter)
|
|
2360
|
+
|
|
2361
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2362
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2363
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2364
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2365
|
+
|
|
2366
|
+
@__dataclass___recursive_repr()
|
|
2367
|
+
def __repr__(self):
|
|
2368
|
+
parts = []
|
|
2369
|
+
parts.append(f"fields={self.fields!r}")
|
|
2370
|
+
parts.append(f"specials={self.specials!r}")
|
|
2371
|
+
parts.append(f"attr_getter={self.attr_getter!r}")
|
|
2372
|
+
return (
|
|
2373
|
+
f"{self.__class__.__qualname__}("
|
|
2374
|
+
f"{', '.join(parts)}"
|
|
2375
|
+
f")"
|
|
2376
|
+
)
|
|
2377
|
+
|
|
2378
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2379
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2380
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2381
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2382
|
+
|
|
2383
|
+
return _process_dataclass
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
@_register(
|
|
2387
|
+
plan_repr=(
|
|
2388
|
+
"Plans(tup=(CopyPlan(fields=('name', 'description', 'input_schema')), EqPlan(fields=('name', 'description', 'in"
|
|
2389
|
+
"put_schema')), FrozenPlan(fields=('name', 'description', 'input_schema'), allow_dynamic_dunder_attrs=False), H"
|
|
2390
|
+
"ashPlan(action='add', fields=('name', 'description', 'input_schema'), cache=False), InitPlan(fields=(InitPlan."
|
|
2391
|
+
"Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init"
|
|
2392
|
+
"=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.F"
|
|
2393
|
+
"ield(name='description', annotation=OpRef(name='init.fields.1.annotation'), default=None, default_factory=None"
|
|
2394
|
+
", init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), Init"
|
|
2395
|
+
"Plan.Field(name='input_schema', annotation=OpRef(name='init.fields.2.annotation'), default=None, default_facto"
|
|
2396
|
+
"ry=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None"
|
|
2397
|
+
")), self_param='self', std_params=('name', 'description', 'input_schema'), kw_only_params=(), frozen=True, slo"
|
|
2398
|
+
"ts=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', k"
|
|
2399
|
+
"w_only=False, fn=None), ReprPlan.Field(name='description', kw_only=False, fn=None), ReprPlan.Field(name='input"
|
|
2400
|
+
"_schema', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
2401
|
+
),
|
|
2402
|
+
plan_repr_sha1='a0bb088e6d220904a11db30de04c9b3fb2ddce42',
|
|
2403
|
+
op_ref_idents=(
|
|
2404
|
+
'__dataclass__init__fields__0__annotation',
|
|
2405
|
+
'__dataclass__init__fields__1__annotation',
|
|
2406
|
+
'__dataclass__init__fields__2__annotation',
|
|
2407
|
+
),
|
|
2408
|
+
cls_names=(
|
|
2409
|
+
('ommlds.backends.anthropic.protocol', 'ToolSpec'),
|
|
2410
|
+
),
|
|
2411
|
+
)
|
|
2412
|
+
def _process_dataclass__a0bb088e6d220904a11db30de04c9b3fb2ddce42():
|
|
2413
|
+
def _process_dataclass(
|
|
2414
|
+
*,
|
|
2415
|
+
__dataclass__cls,
|
|
2416
|
+
__dataclass__init__fields__0__annotation,
|
|
2417
|
+
__dataclass__init__fields__1__annotation,
|
|
2418
|
+
__dataclass__init__fields__2__annotation,
|
|
2419
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2420
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2421
|
+
__dataclass__FnValidationError, # noqa
|
|
2422
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2423
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2424
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2425
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2426
|
+
__dataclass__None=None, # noqa
|
|
2427
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2428
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2429
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2430
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2431
|
+
__dataclass__property=property, # noqa
|
|
2432
|
+
):
|
|
2433
|
+
def __copy__(self):
|
|
2434
|
+
if self.__class__ is not __dataclass__cls:
|
|
2435
|
+
raise TypeError(self)
|
|
2436
|
+
return __dataclass__cls( # noqa
|
|
2437
|
+
name=self.name,
|
|
2438
|
+
description=self.description,
|
|
2439
|
+
input_schema=self.input_schema,
|
|
2440
|
+
)
|
|
2441
|
+
|
|
2442
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2443
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2444
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2445
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2446
|
+
|
|
2447
|
+
def __eq__(self, other):
|
|
2448
|
+
if self is other:
|
|
2449
|
+
return True
|
|
2450
|
+
if self.__class__ is not other.__class__:
|
|
2451
|
+
return NotImplemented
|
|
2452
|
+
return (
|
|
2453
|
+
self.name == other.name and
|
|
2454
|
+
self.description == other.description and
|
|
2455
|
+
self.input_schema == other.input_schema
|
|
2456
|
+
)
|
|
2457
|
+
|
|
2458
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2459
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2460
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2461
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2462
|
+
|
|
2463
|
+
__dataclass___setattr_frozen_fields = {
|
|
2464
|
+
'name',
|
|
2465
|
+
'description',
|
|
2466
|
+
'input_schema',
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
def __setattr__(self, name, value):
|
|
2470
|
+
if (
|
|
2471
|
+
type(self) is __dataclass__cls
|
|
2472
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2473
|
+
):
|
|
2474
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2475
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2476
|
+
|
|
2477
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2478
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2479
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2480
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2481
|
+
|
|
2482
|
+
__dataclass___delattr_frozen_fields = {
|
|
2483
|
+
'name',
|
|
2484
|
+
'description',
|
|
2485
|
+
'input_schema',
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2488
|
+
def __delattr__(self, name):
|
|
2489
|
+
if (
|
|
2490
|
+
type(self) is __dataclass__cls
|
|
2491
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2492
|
+
):
|
|
2493
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2494
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2495
|
+
|
|
2496
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2497
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2498
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2499
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2500
|
+
|
|
2501
|
+
def __hash__(self):
|
|
2502
|
+
return hash((
|
|
2503
|
+
self.name,
|
|
2504
|
+
self.description,
|
|
2505
|
+
self.input_schema,
|
|
2506
|
+
))
|
|
2507
|
+
|
|
2508
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2509
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2510
|
+
|
|
2511
|
+
def __init__(
|
|
2512
|
+
self,
|
|
2513
|
+
name: __dataclass__init__fields__0__annotation,
|
|
2514
|
+
description: __dataclass__init__fields__1__annotation,
|
|
2515
|
+
input_schema: __dataclass__init__fields__2__annotation,
|
|
2516
|
+
) -> __dataclass__None:
|
|
2517
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
2518
|
+
__dataclass__object_setattr(self, 'description', description)
|
|
2519
|
+
__dataclass__object_setattr(self, 'input_schema', input_schema)
|
|
2520
|
+
|
|
2521
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2522
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2523
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2524
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2525
|
+
|
|
2526
|
+
@__dataclass___recursive_repr()
|
|
2527
|
+
def __repr__(self):
|
|
2528
|
+
parts = []
|
|
2529
|
+
parts.append(f"name={self.name!r}")
|
|
2530
|
+
parts.append(f"description={self.description!r}")
|
|
2531
|
+
parts.append(f"input_schema={self.input_schema!r}")
|
|
2532
|
+
return (
|
|
2533
|
+
f"{self.__class__.__qualname__}("
|
|
2534
|
+
f"{', '.join(parts)}"
|
|
2535
|
+
f")"
|
|
2536
|
+
)
|
|
2537
|
+
|
|
2538
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2539
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2540
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2541
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2542
|
+
|
|
2543
|
+
return _process_dataclass
|
|
2544
|
+
|
|
2545
|
+
|
|
2546
|
+
@_register(
|
|
2547
|
+
plan_repr=(
|
|
2548
|
+
"Plans(tup=(CopyPlan(fields=('input_tokens', 'output_tokens', 'cache_creation_input_tokens', 'cache_read_input_"
|
|
2549
|
+
"tokens', 'cache_creation', 'service_tier')), EqPlan(fields=('input_tokens', 'output_tokens', 'cache_creation_i"
|
|
2550
|
+
"nput_tokens', 'cache_read_input_tokens', 'cache_creation', 'service_tier')), FrozenPlan(fields=('input_tokens'"
|
|
2551
|
+
", 'output_tokens', 'cache_creation_input_tokens', 'cache_read_input_tokens', 'cache_creation', 'service_tier')"
|
|
2552
|
+
", allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('input_tokens', 'output_tokens', 'cache_cr"
|
|
2553
|
+
"eation_input_tokens', 'cache_read_input_tokens', 'cache_creation', 'service_tier'), cache=False), InitPlan(fie"
|
|
2554
|
+
"lds=(InitPlan.Field(name='input_tokens', annotation=OpRef(name='init.fields.0.annotation'), default=OpRef(name"
|
|
2555
|
+
"='init.fields.0.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coe"
|
|
2556
|
+
"rce=None, validate=None, check_type=None), InitPlan.Field(name='output_tokens', annotation=OpRef(name='init.fi"
|
|
2557
|
+
"elds.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=Fa"
|
|
2558
|
+
"lse, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='cache_c"
|
|
2559
|
+
"reation_input_tokens', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields.2.de"
|
|
2560
|
+
"fault'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate"
|
|
2561
|
+
"=None, check_type=None), InitPlan.Field(name='cache_read_input_tokens', annotation=OpRef(name='init.fields.3.a"
|
|
2562
|
+
"nnotation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True, override=False, fie"
|
|
2563
|
+
"ld_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='cache_creation'"
|
|
2564
|
+
", annotation=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_fact"
|
|
2565
|
+
"ory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=Non"
|
|
2566
|
+
"e), InitPlan.Field(name='service_tier', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(name="
|
|
2567
|
+
"'init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coer"
|
|
2568
|
+
"ce=None, validate=None, check_type=None)), self_param='self', std_params=(), kw_only_params=('input_tokens', '"
|
|
2569
|
+
"output_tokens', 'cache_creation_input_tokens', 'cache_read_input_tokens', 'cache_creation', 'service_tier'), f"
|
|
2570
|
+
"rozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field"
|
|
2571
|
+
"(name='input_tokens', kw_only=True, fn=None), ReprPlan.Field(name='output_tokens', kw_only=True, fn=None), Rep"
|
|
2572
|
+
"rPlan.Field(name='cache_creation_input_tokens', kw_only=True, fn=None), ReprPlan.Field(name='cache_read_input_"
|
|
2573
|
+
"tokens', kw_only=True, fn=None), ReprPlan.Field(name='cache_creation', kw_only=True, fn=None), ReprPlan.Field("
|
|
2574
|
+
"name='service_tier', kw_only=True, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
2575
|
+
),
|
|
2576
|
+
plan_repr_sha1='a47ab44cf512908b7a879f4d6bafd7aa6de84f97',
|
|
2577
|
+
op_ref_idents=(
|
|
2578
|
+
'__dataclass__init__fields__0__annotation',
|
|
2579
|
+
'__dataclass__init__fields__0__default',
|
|
2580
|
+
'__dataclass__init__fields__1__annotation',
|
|
2581
|
+
'__dataclass__init__fields__1__default',
|
|
2582
|
+
'__dataclass__init__fields__2__annotation',
|
|
2583
|
+
'__dataclass__init__fields__2__default',
|
|
2584
|
+
'__dataclass__init__fields__3__annotation',
|
|
2585
|
+
'__dataclass__init__fields__3__default',
|
|
2586
|
+
'__dataclass__init__fields__4__annotation',
|
|
2587
|
+
'__dataclass__init__fields__4__default',
|
|
2588
|
+
'__dataclass__init__fields__5__annotation',
|
|
2589
|
+
'__dataclass__init__fields__5__default',
|
|
2590
|
+
),
|
|
2591
|
+
cls_names=(
|
|
2592
|
+
('ommlds.backends.anthropic.protocol', 'Usage'),
|
|
2593
|
+
),
|
|
2594
|
+
)
|
|
2595
|
+
def _process_dataclass__a47ab44cf512908b7a879f4d6bafd7aa6de84f97():
|
|
2596
|
+
def _process_dataclass(
|
|
2597
|
+
*,
|
|
2598
|
+
__dataclass__cls,
|
|
2599
|
+
__dataclass__init__fields__0__annotation,
|
|
2600
|
+
__dataclass__init__fields__0__default,
|
|
2601
|
+
__dataclass__init__fields__1__annotation,
|
|
2602
|
+
__dataclass__init__fields__1__default,
|
|
2603
|
+
__dataclass__init__fields__2__annotation,
|
|
2604
|
+
__dataclass__init__fields__2__default,
|
|
2605
|
+
__dataclass__init__fields__3__annotation,
|
|
2606
|
+
__dataclass__init__fields__3__default,
|
|
2607
|
+
__dataclass__init__fields__4__annotation,
|
|
2608
|
+
__dataclass__init__fields__4__default,
|
|
2609
|
+
__dataclass__init__fields__5__annotation,
|
|
2610
|
+
__dataclass__init__fields__5__default,
|
|
2611
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2612
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2613
|
+
__dataclass__FnValidationError, # noqa
|
|
2614
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2615
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2616
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2617
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2618
|
+
__dataclass__None=None, # noqa
|
|
2619
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2620
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2621
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2622
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2623
|
+
__dataclass__property=property, # noqa
|
|
2624
|
+
):
|
|
2625
|
+
def __copy__(self):
|
|
2626
|
+
if self.__class__ is not __dataclass__cls:
|
|
2627
|
+
raise TypeError(self)
|
|
2628
|
+
return __dataclass__cls( # noqa
|
|
2629
|
+
input_tokens=self.input_tokens,
|
|
2630
|
+
output_tokens=self.output_tokens,
|
|
2631
|
+
cache_creation_input_tokens=self.cache_creation_input_tokens,
|
|
2632
|
+
cache_read_input_tokens=self.cache_read_input_tokens,
|
|
2633
|
+
cache_creation=self.cache_creation,
|
|
2634
|
+
service_tier=self.service_tier,
|
|
2635
|
+
)
|
|
2636
|
+
|
|
2637
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2638
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2639
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2640
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2641
|
+
|
|
2642
|
+
def __eq__(self, other):
|
|
2643
|
+
if self is other:
|
|
2644
|
+
return True
|
|
2645
|
+
if self.__class__ is not other.__class__:
|
|
2646
|
+
return NotImplemented
|
|
2647
|
+
return (
|
|
2648
|
+
self.input_tokens == other.input_tokens and
|
|
2649
|
+
self.output_tokens == other.output_tokens and
|
|
2650
|
+
self.cache_creation_input_tokens == other.cache_creation_input_tokens and
|
|
2651
|
+
self.cache_read_input_tokens == other.cache_read_input_tokens and
|
|
2652
|
+
self.cache_creation == other.cache_creation and
|
|
2653
|
+
self.service_tier == other.service_tier
|
|
2654
|
+
)
|
|
2655
|
+
|
|
2656
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2657
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2658
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2659
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2660
|
+
|
|
2661
|
+
__dataclass___setattr_frozen_fields = {
|
|
2662
|
+
'input_tokens',
|
|
2663
|
+
'output_tokens',
|
|
2664
|
+
'cache_creation_input_tokens',
|
|
2665
|
+
'cache_read_input_tokens',
|
|
2666
|
+
'cache_creation',
|
|
2667
|
+
'service_tier',
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
def __setattr__(self, name, value):
|
|
2671
|
+
if (
|
|
2672
|
+
type(self) is __dataclass__cls
|
|
2673
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2674
|
+
):
|
|
2675
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2676
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2677
|
+
|
|
2678
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2679
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2680
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2681
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2682
|
+
|
|
2683
|
+
__dataclass___delattr_frozen_fields = {
|
|
2684
|
+
'input_tokens',
|
|
2685
|
+
'output_tokens',
|
|
2686
|
+
'cache_creation_input_tokens',
|
|
2687
|
+
'cache_read_input_tokens',
|
|
2688
|
+
'cache_creation',
|
|
2689
|
+
'service_tier',
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
def __delattr__(self, name):
|
|
2693
|
+
if (
|
|
2694
|
+
type(self) is __dataclass__cls
|
|
2695
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2696
|
+
):
|
|
2697
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2698
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2699
|
+
|
|
2700
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2701
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2702
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2703
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2704
|
+
|
|
2705
|
+
def __hash__(self):
|
|
2706
|
+
return hash((
|
|
2707
|
+
self.input_tokens,
|
|
2708
|
+
self.output_tokens,
|
|
2709
|
+
self.cache_creation_input_tokens,
|
|
2710
|
+
self.cache_read_input_tokens,
|
|
2711
|
+
self.cache_creation,
|
|
2712
|
+
self.service_tier,
|
|
2713
|
+
))
|
|
2714
|
+
|
|
2715
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2716
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2717
|
+
|
|
2718
|
+
def __init__(
|
|
2719
|
+
self,
|
|
2720
|
+
*,
|
|
2721
|
+
input_tokens: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
2722
|
+
output_tokens: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
2723
|
+
cache_creation_input_tokens: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
2724
|
+
cache_read_input_tokens: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
2725
|
+
cache_creation: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
2726
|
+
service_tier: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
2727
|
+
) -> __dataclass__None:
|
|
2728
|
+
__dataclass__object_setattr(self, 'input_tokens', input_tokens)
|
|
2729
|
+
__dataclass__object_setattr(self, 'output_tokens', output_tokens)
|
|
2730
|
+
__dataclass__object_setattr(self, 'cache_creation_input_tokens', cache_creation_input_tokens)
|
|
2731
|
+
__dataclass__object_setattr(self, 'cache_read_input_tokens', cache_read_input_tokens)
|
|
2732
|
+
__dataclass__object_setattr(self, 'cache_creation', cache_creation)
|
|
2733
|
+
__dataclass__object_setattr(self, 'service_tier', service_tier)
|
|
2734
|
+
|
|
2735
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2736
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2737
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2738
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2739
|
+
|
|
2740
|
+
@__dataclass___recursive_repr()
|
|
2741
|
+
def __repr__(self):
|
|
2742
|
+
parts = []
|
|
2743
|
+
parts.append(f"input_tokens={self.input_tokens!r}")
|
|
2744
|
+
parts.append(f"output_tokens={self.output_tokens!r}")
|
|
2745
|
+
parts.append(f"cache_creation_input_tokens={self.cache_creation_input_tokens!r}")
|
|
2746
|
+
parts.append(f"cache_read_input_tokens={self.cache_read_input_tokens!r}")
|
|
2747
|
+
parts.append(f"cache_creation={self.cache_creation!r}")
|
|
2748
|
+
parts.append(f"service_tier={self.service_tier!r}")
|
|
2749
|
+
return (
|
|
2750
|
+
f"{self.__class__.__qualname__}("
|
|
2751
|
+
f"{', '.join(parts)}"
|
|
2752
|
+
f")"
|
|
2753
|
+
)
|
|
2754
|
+
|
|
2755
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2756
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2757
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2758
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2759
|
+
|
|
2760
|
+
return _process_dataclass
|
|
2761
|
+
|
|
2762
|
+
|
|
2763
|
+
@_register(
|
|
2764
|
+
plan_repr=(
|
|
2765
|
+
"Plans(tup=(CopyPlan(fields=('v_ty', 'l', 'x')), EqPlan(fields=('v_ty', 'l', 'x')), FrozenPlan(fields=('v_ty', "
|
|
2766
|
+
"'l', 'x'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('v_ty', 'l', 'x'), cache=False), "
|
|
2767
|
+
"InitPlan(fields=(InitPlan.Field(name='v_ty', annotation=OpRef(name='init.fields.0.annotation'), default=None, "
|
|
2768
|
+
"default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, ch"
|
|
2769
|
+
"eck_type=None), InitPlan.Field(name='l', annotation=OpRef(name='init.fields.1.annotation'), default=None, defa"
|
|
2770
|
+
"ult_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_"
|
|
2771
|
+
"type=None), InitPlan.Field(name='x', annotation=OpRef(name='init.fields.2.annotation'), default=None, default_"
|
|
2772
|
+
"factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type"
|
|
2773
|
+
"=None)), self_param='self', std_params=('v_ty', 'l', 'x'), kw_only_params=(), frozen=True, slots=False, post_i"
|
|
2774
|
+
"nit_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='v_ty', kw_only=False, fn"
|
|
2775
|
+
"=None), ReprPlan.Field(name='l', kw_only=False, fn=None), ReprPlan.Field(name='x', kw_only=False, fn=None)), i"
|
|
2776
|
+
"d=False, terse=False, default_fn=None)))"
|
|
2777
|
+
),
|
|
2778
|
+
plan_repr_sha1='aa08307883613da816f90047c1bb03f6cdc155a2',
|
|
2779
|
+
op_ref_idents=(
|
|
2780
|
+
'__dataclass__init__fields__0__annotation',
|
|
2781
|
+
'__dataclass__init__fields__1__annotation',
|
|
2782
|
+
'__dataclass__init__fields__2__annotation',
|
|
2783
|
+
),
|
|
2784
|
+
cls_names=(
|
|
2785
|
+
('ommlds.backends.anthropic.protocol._marshal', 'LiteralUnionMarshaler'),
|
|
2786
|
+
('ommlds.backends.anthropic.protocol._marshal', 'LiteralUnionUnmarshaler'),
|
|
2787
|
+
),
|
|
2788
|
+
)
|
|
2789
|
+
def _process_dataclass__aa08307883613da816f90047c1bb03f6cdc155a2():
|
|
2790
|
+
def _process_dataclass(
|
|
2791
|
+
*,
|
|
2792
|
+
__dataclass__cls,
|
|
2793
|
+
__dataclass__init__fields__0__annotation,
|
|
2794
|
+
__dataclass__init__fields__1__annotation,
|
|
2795
|
+
__dataclass__init__fields__2__annotation,
|
|
2796
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2797
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2798
|
+
__dataclass__FnValidationError, # noqa
|
|
2799
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2800
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2801
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2802
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2803
|
+
__dataclass__None=None, # noqa
|
|
2804
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2805
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2806
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2807
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2808
|
+
__dataclass__property=property, # noqa
|
|
2809
|
+
):
|
|
2810
|
+
def __copy__(self):
|
|
2811
|
+
if self.__class__ is not __dataclass__cls:
|
|
2812
|
+
raise TypeError(self)
|
|
2813
|
+
return __dataclass__cls( # noqa
|
|
2814
|
+
v_ty=self.v_ty,
|
|
2815
|
+
l=self.l,
|
|
2816
|
+
x=self.x,
|
|
2817
|
+
)
|
|
2818
|
+
|
|
2819
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2820
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2821
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2822
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2823
|
+
|
|
2824
|
+
def __eq__(self, other):
|
|
2825
|
+
if self is other:
|
|
2826
|
+
return True
|
|
2827
|
+
if self.__class__ is not other.__class__:
|
|
2828
|
+
return NotImplemented
|
|
2829
|
+
return (
|
|
2830
|
+
self.v_ty == other.v_ty and
|
|
2831
|
+
self.l == other.l and
|
|
2832
|
+
self.x == other.x
|
|
2833
|
+
)
|
|
2834
|
+
|
|
2835
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2836
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2837
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2838
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2839
|
+
|
|
2840
|
+
__dataclass___setattr_frozen_fields = {
|
|
2841
|
+
'v_ty',
|
|
2842
|
+
'l',
|
|
2843
|
+
'x',
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
def __setattr__(self, name, value):
|
|
2847
|
+
if (
|
|
2848
|
+
type(self) is __dataclass__cls
|
|
2849
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2850
|
+
):
|
|
2851
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2852
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
2853
|
+
|
|
2854
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
2855
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
2856
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
2857
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
2858
|
+
|
|
2859
|
+
__dataclass___delattr_frozen_fields = {
|
|
2860
|
+
'v_ty',
|
|
2861
|
+
'l',
|
|
2862
|
+
'x',
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
def __delattr__(self, name):
|
|
2866
|
+
if (
|
|
2867
|
+
type(self) is __dataclass__cls
|
|
2868
|
+
or name in __dataclass___delattr_frozen_fields
|
|
2869
|
+
):
|
|
2870
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
2871
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
2872
|
+
|
|
2873
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
2874
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
2875
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
2876
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
2877
|
+
|
|
2878
|
+
def __hash__(self):
|
|
2879
|
+
return hash((
|
|
2880
|
+
self.v_ty,
|
|
2881
|
+
self.l,
|
|
2882
|
+
self.x,
|
|
2883
|
+
))
|
|
2884
|
+
|
|
2885
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
2886
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
2887
|
+
|
|
2888
|
+
def __init__(
|
|
2889
|
+
self,
|
|
2890
|
+
v_ty: __dataclass__init__fields__0__annotation,
|
|
2891
|
+
l: __dataclass__init__fields__1__annotation,
|
|
2892
|
+
x: __dataclass__init__fields__2__annotation,
|
|
2893
|
+
) -> __dataclass__None:
|
|
2894
|
+
__dataclass__object_setattr(self, 'v_ty', v_ty)
|
|
2895
|
+
__dataclass__object_setattr(self, 'l', l)
|
|
2896
|
+
__dataclass__object_setattr(self, 'x', x)
|
|
2897
|
+
|
|
2898
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
2899
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
2900
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
2901
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
2902
|
+
|
|
2903
|
+
@__dataclass___recursive_repr()
|
|
2904
|
+
def __repr__(self):
|
|
2905
|
+
parts = []
|
|
2906
|
+
parts.append(f"v_ty={self.v_ty!r}")
|
|
2907
|
+
parts.append(f"l={self.l!r}")
|
|
2908
|
+
parts.append(f"x={self.x!r}")
|
|
2909
|
+
return (
|
|
2910
|
+
f"{self.__class__.__qualname__}("
|
|
2911
|
+
f"{', '.join(parts)}"
|
|
2912
|
+
f")"
|
|
2913
|
+
)
|
|
2914
|
+
|
|
2915
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
2916
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
2917
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
2918
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
2919
|
+
|
|
2920
|
+
return _process_dataclass
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
@_register(
|
|
2924
|
+
plan_repr=(
|
|
2925
|
+
"Plans(tup=(CopyPlan(fields=('tys',)), EqPlan(fields=('tys',)), FrozenPlan(fields=('tys',), allow_dynamic_dunde"
|
|
2926
|
+
"r_attrs=False), HashPlan(action='add', fields=('tys',), cache=False), InitPlan(fields=(InitPlan.Field(name='ty"
|
|
2927
|
+
"s', annotation=OpRef(name='init.fields.0.annotation'), default=OpRef(name='init.fields.0.default'), default_fa"
|
|
2928
|
+
"ctory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=N"
|
|
2929
|
+
"one),), self_param='self', std_params=('tys',), kw_only_params=(), frozen=True, slots=False, post_init_params="
|
|
2930
|
+
"None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='tys', kw_only=False, fn=None),), id"
|
|
2931
|
+
"=False, terse=False, default_fn=None)))"
|
|
2932
|
+
),
|
|
2933
|
+
plan_repr_sha1='b5727e74a7047b8747632a1bea03a771a8a8aef4',
|
|
2934
|
+
op_ref_idents=(
|
|
2935
|
+
'__dataclass__init__fields__0__annotation',
|
|
2936
|
+
'__dataclass__init__fields__0__default',
|
|
2937
|
+
),
|
|
2938
|
+
cls_names=(
|
|
2939
|
+
('ommlds.backends.anthropic.protocol._marshal', 'PrimitiveUnionMarshalerFactory'),
|
|
2940
|
+
('ommlds.backends.anthropic.protocol._marshal', 'PrimitiveUnionUnmarshalerFactory'),
|
|
2941
|
+
),
|
|
2942
|
+
)
|
|
2943
|
+
def _process_dataclass__b5727e74a7047b8747632a1bea03a771a8a8aef4():
|
|
2944
|
+
def _process_dataclass(
|
|
2945
|
+
*,
|
|
2946
|
+
__dataclass__cls,
|
|
2947
|
+
__dataclass__init__fields__0__annotation,
|
|
2948
|
+
__dataclass__init__fields__0__default,
|
|
2949
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
2950
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
2951
|
+
__dataclass__FnValidationError, # noqa
|
|
2952
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
2953
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
2954
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
2955
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
2956
|
+
__dataclass__None=None, # noqa
|
|
2957
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
2958
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
2959
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
2960
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
2961
|
+
__dataclass__property=property, # noqa
|
|
2962
|
+
):
|
|
2963
|
+
def __copy__(self):
|
|
2964
|
+
if self.__class__ is not __dataclass__cls:
|
|
2965
|
+
raise TypeError(self)
|
|
2966
|
+
return __dataclass__cls( # noqa
|
|
2967
|
+
tys=self.tys,
|
|
2968
|
+
)
|
|
2969
|
+
|
|
2970
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
2971
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
2972
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
2973
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
2974
|
+
|
|
2975
|
+
def __eq__(self, other):
|
|
2976
|
+
if self is other:
|
|
2977
|
+
return True
|
|
2978
|
+
if self.__class__ is not other.__class__:
|
|
2979
|
+
return NotImplemented
|
|
2980
|
+
return (
|
|
2981
|
+
self.tys == other.tys
|
|
2982
|
+
)
|
|
2983
|
+
|
|
2984
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
2985
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
2986
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
2987
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
2988
|
+
|
|
2989
|
+
__dataclass___setattr_frozen_fields = {
|
|
2990
|
+
'tys',
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2993
|
+
def __setattr__(self, name, value):
|
|
2994
|
+
if (
|
|
2995
|
+
type(self) is __dataclass__cls
|
|
2996
|
+
or name in __dataclass___setattr_frozen_fields
|
|
2997
|
+
):
|
|
2998
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
2999
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3000
|
+
|
|
3001
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3002
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3003
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3004
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3005
|
+
|
|
3006
|
+
__dataclass___delattr_frozen_fields = {
|
|
3007
|
+
'tys',
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
def __delattr__(self, name):
|
|
3011
|
+
if (
|
|
3012
|
+
type(self) is __dataclass__cls
|
|
3013
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3014
|
+
):
|
|
3015
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3016
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3017
|
+
|
|
3018
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3019
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3020
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3021
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3022
|
+
|
|
3023
|
+
def __hash__(self):
|
|
3024
|
+
return hash((
|
|
3025
|
+
self.tys,
|
|
3026
|
+
))
|
|
3027
|
+
|
|
3028
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3029
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3030
|
+
|
|
3031
|
+
def __init__(
|
|
3032
|
+
self,
|
|
3033
|
+
tys: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
3034
|
+
) -> __dataclass__None:
|
|
3035
|
+
__dataclass__object_setattr(self, 'tys', tys)
|
|
3036
|
+
|
|
3037
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3038
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3039
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3040
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3041
|
+
|
|
3042
|
+
@__dataclass___recursive_repr()
|
|
3043
|
+
def __repr__(self):
|
|
3044
|
+
parts = []
|
|
3045
|
+
parts.append(f"tys={self.tys!r}")
|
|
3046
|
+
return (
|
|
3047
|
+
f"{self.__class__.__qualname__}("
|
|
3048
|
+
f"{', '.join(parts)}"
|
|
3049
|
+
f")"
|
|
3050
|
+
)
|
|
3051
|
+
|
|
3052
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3053
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3054
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3055
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3056
|
+
|
|
3057
|
+
return _process_dataclass
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
@_register(
|
|
3061
|
+
plan_repr=(
|
|
3062
|
+
"Plans(tup=(CopyPlan(fields=('name', 'alts', 'options', 'marshaler', 'marshaler_factory', 'unmarshaler', 'unmar"
|
|
3063
|
+
"shaler_factory')), EqPlan(fields=('name', 'alts', 'options', 'marshaler', 'marshaler_factory', 'unmarshaler', "
|
|
3064
|
+
"'unmarshaler_factory')), FrozenPlan(fields=('name', 'alts', 'options', 'marshaler', 'marshaler_factory', 'unma"
|
|
3065
|
+
"rshaler', 'unmarshaler_factory'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('name', 'a"
|
|
3066
|
+
"lts', 'options', 'marshaler', 'marshaler_factory', 'unmarshaler', 'unmarshaler_factory'), cache=False), InitPl"
|
|
3067
|
+
"an(fields=(InitPlan.Field(name='name', annotation=OpRef(name='init.fields.0.annotation'), default=OpRef(name='"
|
|
3068
|
+
"init.fields.0.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerc"
|
|
3069
|
+
"e=None, validate=None, check_type=None), InitPlan.Field(name='alts', annotation=OpRef(name='init.fields.1.anno"
|
|
3070
|
+
"tation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True, override=False, field_"
|
|
3071
|
+
"type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='options', annotati"
|
|
3072
|
+
"on=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init.fields.2.default'), default_factory=None, "
|
|
3073
|
+
"init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPl"
|
|
3074
|
+
"an.Field(name='marshaler', annotation=OpRef(name='init.fields.3.annotation'), default=OpRef(name='init.fields."
|
|
3075
|
+
"3.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, vali"
|
|
3076
|
+
"date=None, check_type=OpRef(name='init.fields.3.check_type')), InitPlan.Field(name='marshaler_factory', annota"
|
|
3077
|
+
"tion=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_factory=None"
|
|
3078
|
+
", init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), Init"
|
|
3079
|
+
"Plan.Field(name='unmarshaler', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(name='init.fie"
|
|
3080
|
+
"lds.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, "
|
|
3081
|
+
"validate=None, check_type=OpRef(name='init.fields.5.check_type')), InitPlan.Field(name='unmarshaler_factory', "
|
|
3082
|
+
"annotation=OpRef(name='init.fields.6.annotation'), default=OpRef(name='init.fields.6.default'), default_factor"
|
|
3083
|
+
"y=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)"
|
|
3084
|
+
"), self_param='self', std_params=(), kw_only_params=('name', 'alts', 'options', 'marshaler', 'marshaler_factor"
|
|
3085
|
+
"y', 'unmarshaler', 'unmarshaler_factory'), frozen=True, slots=False, post_init_params=None, init_fns=(), valid"
|
|
3086
|
+
"ate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='name', kw_only=True, fn=None), ReprPlan.Field(name='alts', "
|
|
3087
|
+
"kw_only=True, fn=None), ReprPlan.Field(name='options', kw_only=True, fn=None), ReprPlan.Field(name='marshaler'"
|
|
3088
|
+
", kw_only=True, fn=None), ReprPlan.Field(name='marshaler_factory', kw_only=True, fn=None), ReprPlan.Field(name"
|
|
3089
|
+
"='unmarshaler', kw_only=True, fn=None), ReprPlan.Field(name='unmarshaler_factory', kw_only=True, fn=None)), id"
|
|
3090
|
+
"=False, terse=False, default_fn=None)))"
|
|
3091
|
+
),
|
|
3092
|
+
plan_repr_sha1='bad93a176f34458732d6dbbd403a7930767b3796',
|
|
3093
|
+
op_ref_idents=(
|
|
3094
|
+
'__dataclass__init__fields__0__annotation',
|
|
3095
|
+
'__dataclass__init__fields__0__default',
|
|
3096
|
+
'__dataclass__init__fields__1__annotation',
|
|
3097
|
+
'__dataclass__init__fields__1__default',
|
|
3098
|
+
'__dataclass__init__fields__2__annotation',
|
|
3099
|
+
'__dataclass__init__fields__2__default',
|
|
3100
|
+
'__dataclass__init__fields__3__annotation',
|
|
3101
|
+
'__dataclass__init__fields__3__check_type',
|
|
3102
|
+
'__dataclass__init__fields__3__default',
|
|
3103
|
+
'__dataclass__init__fields__4__annotation',
|
|
3104
|
+
'__dataclass__init__fields__4__default',
|
|
3105
|
+
'__dataclass__init__fields__5__annotation',
|
|
3106
|
+
'__dataclass__init__fields__5__check_type',
|
|
3107
|
+
'__dataclass__init__fields__5__default',
|
|
3108
|
+
'__dataclass__init__fields__6__annotation',
|
|
3109
|
+
'__dataclass__init__fields__6__default',
|
|
3110
|
+
),
|
|
3111
|
+
cls_names=(
|
|
3112
|
+
('ommlds.backends.anthropic.protocol', 'FieldMetadata'),
|
|
3113
|
+
),
|
|
3114
|
+
)
|
|
3115
|
+
def _process_dataclass__bad93a176f34458732d6dbbd403a7930767b3796():
|
|
3116
|
+
def _process_dataclass(
|
|
3117
|
+
*,
|
|
3118
|
+
__dataclass__cls,
|
|
3119
|
+
__dataclass__init__fields__0__annotation,
|
|
3120
|
+
__dataclass__init__fields__0__default,
|
|
3121
|
+
__dataclass__init__fields__1__annotation,
|
|
3122
|
+
__dataclass__init__fields__1__default,
|
|
3123
|
+
__dataclass__init__fields__2__annotation,
|
|
3124
|
+
__dataclass__init__fields__2__default,
|
|
3125
|
+
__dataclass__init__fields__3__annotation,
|
|
3126
|
+
__dataclass__init__fields__3__check_type,
|
|
3127
|
+
__dataclass__init__fields__3__default,
|
|
3128
|
+
__dataclass__init__fields__4__annotation,
|
|
3129
|
+
__dataclass__init__fields__4__default,
|
|
3130
|
+
__dataclass__init__fields__5__annotation,
|
|
3131
|
+
__dataclass__init__fields__5__check_type,
|
|
3132
|
+
__dataclass__init__fields__5__default,
|
|
3133
|
+
__dataclass__init__fields__6__annotation,
|
|
3134
|
+
__dataclass__init__fields__6__default,
|
|
3135
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
3136
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
3137
|
+
__dataclass__FnValidationError, # noqa
|
|
3138
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3139
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3140
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3141
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3142
|
+
__dataclass__None=None, # noqa
|
|
3143
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3144
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3145
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3146
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3147
|
+
__dataclass__property=property, # noqa
|
|
3148
|
+
):
|
|
3149
|
+
def __copy__(self):
|
|
3150
|
+
if self.__class__ is not __dataclass__cls:
|
|
3151
|
+
raise TypeError(self)
|
|
3152
|
+
return __dataclass__cls( # noqa
|
|
3153
|
+
name=self.name,
|
|
3154
|
+
alts=self.alts,
|
|
3155
|
+
options=self.options,
|
|
3156
|
+
marshaler=self.marshaler,
|
|
3157
|
+
marshaler_factory=self.marshaler_factory,
|
|
3158
|
+
unmarshaler=self.unmarshaler,
|
|
3159
|
+
unmarshaler_factory=self.unmarshaler_factory,
|
|
3160
|
+
)
|
|
3161
|
+
|
|
3162
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
3163
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
3164
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
3165
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
3166
|
+
|
|
3167
|
+
def __eq__(self, other):
|
|
3168
|
+
if self is other:
|
|
3169
|
+
return True
|
|
3170
|
+
if self.__class__ is not other.__class__:
|
|
3171
|
+
return NotImplemented
|
|
3172
|
+
return (
|
|
3173
|
+
self.name == other.name and
|
|
3174
|
+
self.alts == other.alts and
|
|
3175
|
+
self.options == other.options and
|
|
3176
|
+
self.marshaler == other.marshaler and
|
|
3177
|
+
self.marshaler_factory == other.marshaler_factory and
|
|
3178
|
+
self.unmarshaler == other.unmarshaler and
|
|
3179
|
+
self.unmarshaler_factory == other.unmarshaler_factory
|
|
3180
|
+
)
|
|
3181
|
+
|
|
3182
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
3183
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
3184
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
3185
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3186
|
+
|
|
3187
|
+
__dataclass___setattr_frozen_fields = {
|
|
3188
|
+
'name',
|
|
3189
|
+
'alts',
|
|
3190
|
+
'options',
|
|
3191
|
+
'marshaler',
|
|
3192
|
+
'marshaler_factory',
|
|
3193
|
+
'unmarshaler',
|
|
3194
|
+
'unmarshaler_factory',
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
def __setattr__(self, name, value):
|
|
3198
|
+
if (
|
|
3199
|
+
type(self) is __dataclass__cls
|
|
3200
|
+
or name in __dataclass___setattr_frozen_fields
|
|
3201
|
+
):
|
|
3202
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
3203
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3204
|
+
|
|
3205
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3206
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3207
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3208
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3209
|
+
|
|
3210
|
+
__dataclass___delattr_frozen_fields = {
|
|
3211
|
+
'name',
|
|
3212
|
+
'alts',
|
|
3213
|
+
'options',
|
|
3214
|
+
'marshaler',
|
|
3215
|
+
'marshaler_factory',
|
|
3216
|
+
'unmarshaler',
|
|
3217
|
+
'unmarshaler_factory',
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3220
|
+
def __delattr__(self, name):
|
|
3221
|
+
if (
|
|
3222
|
+
type(self) is __dataclass__cls
|
|
3223
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3224
|
+
):
|
|
3225
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3226
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3227
|
+
|
|
3228
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3229
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3230
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3231
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3232
|
+
|
|
3233
|
+
def __hash__(self):
|
|
3234
|
+
return hash((
|
|
3235
|
+
self.name,
|
|
3236
|
+
self.alts,
|
|
3237
|
+
self.options,
|
|
3238
|
+
self.marshaler,
|
|
3239
|
+
self.marshaler_factory,
|
|
3240
|
+
self.unmarshaler,
|
|
3241
|
+
self.unmarshaler_factory,
|
|
3242
|
+
))
|
|
3243
|
+
|
|
3244
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3245
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3246
|
+
|
|
3247
|
+
def __init__(
|
|
3248
|
+
self,
|
|
3249
|
+
*,
|
|
3250
|
+
name: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
3251
|
+
alts: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
3252
|
+
options: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
3253
|
+
marshaler: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
3254
|
+
marshaler_factory: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
3255
|
+
unmarshaler: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
3256
|
+
unmarshaler_factory: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
3257
|
+
) -> __dataclass__None:
|
|
3258
|
+
if not __dataclass__isinstance(marshaler, __dataclass__init__fields__3__check_type):
|
|
3259
|
+
raise __dataclass__FieldTypeValidationError(
|
|
3260
|
+
obj=self,
|
|
3261
|
+
type=__dataclass__init__fields__3__check_type,
|
|
3262
|
+
field='marshaler',
|
|
3263
|
+
value=marshaler,
|
|
3264
|
+
)
|
|
3265
|
+
if not __dataclass__isinstance(unmarshaler, __dataclass__init__fields__5__check_type):
|
|
3266
|
+
raise __dataclass__FieldTypeValidationError(
|
|
3267
|
+
obj=self,
|
|
3268
|
+
type=__dataclass__init__fields__5__check_type,
|
|
3269
|
+
field='unmarshaler',
|
|
3270
|
+
value=unmarshaler,
|
|
3271
|
+
)
|
|
3272
|
+
__dataclass__object_setattr(self, 'name', name)
|
|
3273
|
+
__dataclass__object_setattr(self, 'alts', alts)
|
|
3274
|
+
__dataclass__object_setattr(self, 'options', options)
|
|
3275
|
+
__dataclass__object_setattr(self, 'marshaler', marshaler)
|
|
3276
|
+
__dataclass__object_setattr(self, 'marshaler_factory', marshaler_factory)
|
|
3277
|
+
__dataclass__object_setattr(self, 'unmarshaler', unmarshaler)
|
|
3278
|
+
__dataclass__object_setattr(self, 'unmarshaler_factory', unmarshaler_factory)
|
|
3279
|
+
|
|
3280
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3281
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3282
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3283
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3284
|
+
|
|
3285
|
+
@__dataclass___recursive_repr()
|
|
3286
|
+
def __repr__(self):
|
|
3287
|
+
parts = []
|
|
3288
|
+
parts.append(f"name={self.name!r}")
|
|
3289
|
+
parts.append(f"alts={self.alts!r}")
|
|
3290
|
+
parts.append(f"options={self.options!r}")
|
|
3291
|
+
parts.append(f"marshaler={self.marshaler!r}")
|
|
3292
|
+
parts.append(f"marshaler_factory={self.marshaler_factory!r}")
|
|
3293
|
+
parts.append(f"unmarshaler={self.unmarshaler!r}")
|
|
3294
|
+
parts.append(f"unmarshaler_factory={self.unmarshaler_factory!r}")
|
|
3295
|
+
return (
|
|
3296
|
+
f"{self.__class__.__qualname__}("
|
|
3297
|
+
f"{', '.join(parts)}"
|
|
3298
|
+
f")"
|
|
3299
|
+
)
|
|
3300
|
+
|
|
3301
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3302
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3303
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3304
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3305
|
+
|
|
3306
|
+
return _process_dataclass
|
|
3307
|
+
|
|
3308
|
+
|
|
3309
|
+
@_register(
|
|
3310
|
+
plan_repr=(
|
|
3311
|
+
"Plans(tup=(CopyPlan(fields=('tool_use_id', 'content')), EqPlan(fields=('tool_use_id', 'content')), FrozenPlan("
|
|
3312
|
+
"fields=('tool_use_id', 'content'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('tool_use"
|
|
3313
|
+
"_id', 'content'), cache=False), InitPlan(fields=(InitPlan.Field(name='tool_use_id', annotation=OpRef(name='ini"
|
|
3314
|
+
"t.fields.0.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType.I"
|
|
3315
|
+
"NSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='content', annotation=OpRef(name='i"
|
|
3316
|
+
"nit.fields.1.annotation'), default=None, default_factory=None, init=True, override=False, field_type=FieldType"
|
|
3317
|
+
".INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_params=('tool_use_id', 'conte"
|
|
3318
|
+
"nt'), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprP"
|
|
3319
|
+
"lan(fields=(ReprPlan.Field(name='tool_use_id', kw_only=False, fn=None), ReprPlan.Field(name='content', kw_only"
|
|
3320
|
+
"=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
3321
|
+
),
|
|
3322
|
+
plan_repr_sha1='c784ae3d44b6988e2459abc84ce5f705b6eca3b5',
|
|
3323
|
+
op_ref_idents=(
|
|
3324
|
+
'__dataclass__init__fields__0__annotation',
|
|
3325
|
+
'__dataclass__init__fields__1__annotation',
|
|
3326
|
+
),
|
|
3327
|
+
cls_names=(
|
|
3328
|
+
('ommlds.backends.anthropic.protocol', 'ToolResult'),
|
|
3329
|
+
),
|
|
3330
|
+
)
|
|
3331
|
+
def _process_dataclass__c784ae3d44b6988e2459abc84ce5f705b6eca3b5():
|
|
3332
|
+
def _process_dataclass(
|
|
3333
|
+
*,
|
|
3334
|
+
__dataclass__cls,
|
|
3335
|
+
__dataclass__init__fields__0__annotation,
|
|
3336
|
+
__dataclass__init__fields__1__annotation,
|
|
3337
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
3338
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
3339
|
+
__dataclass__FnValidationError, # noqa
|
|
3340
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3341
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3342
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3343
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3344
|
+
__dataclass__None=None, # noqa
|
|
3345
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3346
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3347
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3348
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3349
|
+
__dataclass__property=property, # noqa
|
|
3350
|
+
):
|
|
3351
|
+
def __copy__(self):
|
|
3352
|
+
if self.__class__ is not __dataclass__cls:
|
|
3353
|
+
raise TypeError(self)
|
|
3354
|
+
return __dataclass__cls( # noqa
|
|
3355
|
+
tool_use_id=self.tool_use_id,
|
|
3356
|
+
content=self.content,
|
|
3357
|
+
)
|
|
3358
|
+
|
|
3359
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
3360
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
3361
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
3362
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
3363
|
+
|
|
3364
|
+
def __eq__(self, other):
|
|
3365
|
+
if self is other:
|
|
3366
|
+
return True
|
|
3367
|
+
if self.__class__ is not other.__class__:
|
|
3368
|
+
return NotImplemented
|
|
3369
|
+
return (
|
|
3370
|
+
self.tool_use_id == other.tool_use_id and
|
|
3371
|
+
self.content == other.content
|
|
3372
|
+
)
|
|
3373
|
+
|
|
3374
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
3375
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
3376
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
3377
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3378
|
+
|
|
3379
|
+
__dataclass___setattr_frozen_fields = {
|
|
3380
|
+
'tool_use_id',
|
|
3381
|
+
'content',
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
def __setattr__(self, name, value):
|
|
3385
|
+
if (
|
|
3386
|
+
type(self) is __dataclass__cls
|
|
3387
|
+
or name in __dataclass___setattr_frozen_fields
|
|
3388
|
+
):
|
|
3389
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
3390
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3391
|
+
|
|
3392
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3393
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3394
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3395
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3396
|
+
|
|
3397
|
+
__dataclass___delattr_frozen_fields = {
|
|
3398
|
+
'tool_use_id',
|
|
3399
|
+
'content',
|
|
3400
|
+
}
|
|
3401
|
+
|
|
3402
|
+
def __delattr__(self, name):
|
|
3403
|
+
if (
|
|
3404
|
+
type(self) is __dataclass__cls
|
|
3405
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3406
|
+
):
|
|
3407
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3408
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3409
|
+
|
|
3410
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3411
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3412
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3413
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3414
|
+
|
|
3415
|
+
def __hash__(self):
|
|
3416
|
+
return hash((
|
|
3417
|
+
self.tool_use_id,
|
|
3418
|
+
self.content,
|
|
3419
|
+
))
|
|
3420
|
+
|
|
3421
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3422
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3423
|
+
|
|
3424
|
+
def __init__(
|
|
3425
|
+
self,
|
|
3426
|
+
tool_use_id: __dataclass__init__fields__0__annotation,
|
|
3427
|
+
content: __dataclass__init__fields__1__annotation,
|
|
3428
|
+
) -> __dataclass__None:
|
|
3429
|
+
__dataclass__object_setattr(self, 'tool_use_id', tool_use_id)
|
|
3430
|
+
__dataclass__object_setattr(self, 'content', content)
|
|
3431
|
+
|
|
3432
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3433
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3434
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3435
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3436
|
+
|
|
3437
|
+
@__dataclass___recursive_repr()
|
|
3438
|
+
def __repr__(self):
|
|
3439
|
+
parts = []
|
|
3440
|
+
parts.append(f"tool_use_id={self.tool_use_id!r}")
|
|
3441
|
+
parts.append(f"content={self.content!r}")
|
|
3442
|
+
return (
|
|
3443
|
+
f"{self.__class__.__qualname__}("
|
|
3444
|
+
f"{', '.join(parts)}"
|
|
3445
|
+
f")"
|
|
3446
|
+
)
|
|
3447
|
+
|
|
3448
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3449
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3450
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3451
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3452
|
+
|
|
3453
|
+
return _process_dataclass
|
|
3454
|
+
|
|
3455
|
+
|
|
3456
|
+
@_register(
|
|
3457
|
+
plan_repr=(
|
|
3458
|
+
"Plans(tup=(CopyPlan(fields=('u',)), EqPlan(fields=('u',)), FrozenPlan(fields=('u',), allow_dynamic_dunder_attr"
|
|
3459
|
+
"s=False), HashPlan(action='add', fields=('u',), cache=False), InitPlan(fields=(InitPlan.Field(name='u', annota"
|
|
3460
|
+
"tion=OpRef(name='init.fields.0.annotation'), default=None, default_factory=OpRef(name='init.fields.0.default_f"
|
|
3461
|
+
"actory'), init=True, override=False, field_type=FieldType.INSTANCE, coerce=OpRef(name='init.fields.0.coerce'),"
|
|
3462
|
+
" validate=None, check_type=None),), self_param='self', std_params=('u',), kw_only_params=(), frozen=True, slot"
|
|
3463
|
+
"s=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='u', kw_on"
|
|
3464
|
+
"ly=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
3465
|
+
),
|
|
3466
|
+
plan_repr_sha1='c94d23c43d187cd3725f98ba417a2d32b630defb',
|
|
3467
|
+
op_ref_idents=(
|
|
3468
|
+
'__dataclass__init__fields__0__annotation',
|
|
3469
|
+
'__dataclass__init__fields__0__coerce',
|
|
3470
|
+
'__dataclass__init__fields__0__default_factory',
|
|
3471
|
+
),
|
|
3472
|
+
cls_names=(
|
|
3473
|
+
('ommlds.backends.anthropic.protocol._marshal', 'TypeMapUnmarshalerFactory'),
|
|
3474
|
+
),
|
|
3475
|
+
)
|
|
3476
|
+
def _process_dataclass__c94d23c43d187cd3725f98ba417a2d32b630defb():
|
|
3477
|
+
def _process_dataclass(
|
|
3478
|
+
*,
|
|
3479
|
+
__dataclass__cls,
|
|
3480
|
+
__dataclass__init__fields__0__annotation,
|
|
3481
|
+
__dataclass__init__fields__0__coerce,
|
|
3482
|
+
__dataclass__init__fields__0__default_factory,
|
|
3483
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
3484
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
3485
|
+
__dataclass__FnValidationError, # noqa
|
|
3486
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3487
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3488
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3489
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3490
|
+
__dataclass__None=None, # noqa
|
|
3491
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3492
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3493
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3494
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3495
|
+
__dataclass__property=property, # noqa
|
|
3496
|
+
):
|
|
3497
|
+
def __copy__(self):
|
|
3498
|
+
if self.__class__ is not __dataclass__cls:
|
|
3499
|
+
raise TypeError(self)
|
|
3500
|
+
return __dataclass__cls( # noqa
|
|
3501
|
+
u=self.u,
|
|
3502
|
+
)
|
|
3503
|
+
|
|
3504
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
3505
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
3506
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
3507
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
3508
|
+
|
|
3509
|
+
def __eq__(self, other):
|
|
3510
|
+
if self is other:
|
|
3511
|
+
return True
|
|
3512
|
+
if self.__class__ is not other.__class__:
|
|
3513
|
+
return NotImplemented
|
|
3514
|
+
return (
|
|
3515
|
+
self.u == other.u
|
|
3516
|
+
)
|
|
3517
|
+
|
|
3518
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
3519
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
3520
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
3521
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3522
|
+
|
|
3523
|
+
__dataclass___setattr_frozen_fields = {
|
|
3524
|
+
'u',
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
def __setattr__(self, name, value):
|
|
3528
|
+
if (
|
|
3529
|
+
type(self) is __dataclass__cls
|
|
3530
|
+
or name in __dataclass___setattr_frozen_fields
|
|
3531
|
+
):
|
|
3532
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
3533
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3534
|
+
|
|
3535
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3536
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3537
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3538
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3539
|
+
|
|
3540
|
+
__dataclass___delattr_frozen_fields = {
|
|
3541
|
+
'u',
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3544
|
+
def __delattr__(self, name):
|
|
3545
|
+
if (
|
|
3546
|
+
type(self) is __dataclass__cls
|
|
3547
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3548
|
+
):
|
|
3549
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3550
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3551
|
+
|
|
3552
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3553
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3554
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3555
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3556
|
+
|
|
3557
|
+
def __hash__(self):
|
|
3558
|
+
return hash((
|
|
3559
|
+
self.u,
|
|
3560
|
+
))
|
|
3561
|
+
|
|
3562
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3563
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3564
|
+
|
|
3565
|
+
def __init__(
|
|
3566
|
+
self,
|
|
3567
|
+
u: __dataclass__init__fields__0__annotation = __dataclass__HAS_DEFAULT_FACTORY,
|
|
3568
|
+
) -> __dataclass__None:
|
|
3569
|
+
if u is __dataclass__HAS_DEFAULT_FACTORY:
|
|
3570
|
+
u = __dataclass__init__fields__0__default_factory()
|
|
3571
|
+
u = __dataclass__init__fields__0__coerce(u)
|
|
3572
|
+
__dataclass__object_setattr(self, 'u', u)
|
|
3573
|
+
|
|
3574
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3575
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3576
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3577
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3578
|
+
|
|
3579
|
+
@__dataclass___recursive_repr()
|
|
3580
|
+
def __repr__(self):
|
|
3581
|
+
parts = []
|
|
3582
|
+
parts.append(f"u={self.u!r}")
|
|
3583
|
+
return (
|
|
3584
|
+
f"{self.__class__.__qualname__}("
|
|
3585
|
+
f"{', '.join(parts)}"
|
|
3586
|
+
f")"
|
|
3587
|
+
)
|
|
3588
|
+
|
|
3589
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3590
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3591
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3592
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3593
|
+
|
|
3594
|
+
return _process_dataclass
|
|
3595
|
+
|
|
3596
|
+
|
|
3597
|
+
@_register(
|
|
3598
|
+
plan_repr=(
|
|
3599
|
+
"Plans(tup=(CopyPlan(fields=('lst',)), EqPlan(fields=('lst',)), FrozenPlan(fields=('lst',), allow_dynamic_dunde"
|
|
3600
|
+
"r_attrs=False), HashPlan(action='add', fields=('lst',), cache=False), InitPlan(fields=(InitPlan.Field(name='ls"
|
|
3601
|
+
"t', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override"
|
|
3602
|
+
"=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self', std_"
|
|
3603
|
+
"params=('lst',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(OpRef(name='ini"
|
|
3604
|
+
"t.init_fns.0'), OpRef(name='init.init_fns.1'), OpRef(name='init.init_fns.2')), validate_fns=()), ReprPlan(fiel"
|
|
3605
|
+
"ds=(ReprPlan.Field(name='lst', kw_only=False, fn=None),), id=False, terse=False, default_fn=None)))"
|
|
3606
|
+
),
|
|
3607
|
+
plan_repr_sha1='d79af82ecd003199ceaa4594c2592f2dbb8ba386',
|
|
3608
|
+
op_ref_idents=(
|
|
3609
|
+
'__dataclass__init__fields__0__annotation',
|
|
3610
|
+
'__dataclass__init__init_fns__0',
|
|
3611
|
+
'__dataclass__init__init_fns__1',
|
|
3612
|
+
'__dataclass__init__init_fns__2',
|
|
3613
|
+
),
|
|
3614
|
+
cls_names=(
|
|
3615
|
+
('ommlds.backends.anthropic.protocol', 'FieldInfos'),
|
|
3616
|
+
),
|
|
3617
|
+
)
|
|
3618
|
+
def _process_dataclass__d79af82ecd003199ceaa4594c2592f2dbb8ba386():
|
|
3619
|
+
def _process_dataclass(
|
|
3620
|
+
*,
|
|
3621
|
+
__dataclass__cls,
|
|
3622
|
+
__dataclass__init__fields__0__annotation,
|
|
3623
|
+
__dataclass__init__init_fns__0,
|
|
3624
|
+
__dataclass__init__init_fns__1,
|
|
3625
|
+
__dataclass__init__init_fns__2,
|
|
3626
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
3627
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
3628
|
+
__dataclass__FnValidationError, # noqa
|
|
3629
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3630
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3631
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3632
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3633
|
+
__dataclass__None=None, # noqa
|
|
3634
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3635
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3636
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3637
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3638
|
+
__dataclass__property=property, # noqa
|
|
3639
|
+
):
|
|
3640
|
+
def __copy__(self):
|
|
3641
|
+
if self.__class__ is not __dataclass__cls:
|
|
3642
|
+
raise TypeError(self)
|
|
3643
|
+
return __dataclass__cls( # noqa
|
|
3644
|
+
lst=self.lst,
|
|
3645
|
+
)
|
|
3646
|
+
|
|
3647
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
3648
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
3649
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
3650
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
3651
|
+
|
|
3652
|
+
def __eq__(self, other):
|
|
3653
|
+
if self is other:
|
|
3654
|
+
return True
|
|
3655
|
+
if self.__class__ is not other.__class__:
|
|
3656
|
+
return NotImplemented
|
|
3657
|
+
return (
|
|
3658
|
+
self.lst == other.lst
|
|
3659
|
+
)
|
|
3660
|
+
|
|
3661
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
3662
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
3663
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
3664
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3665
|
+
|
|
3666
|
+
__dataclass___setattr_frozen_fields = {
|
|
3667
|
+
'lst',
|
|
3668
|
+
}
|
|
3669
|
+
|
|
3670
|
+
def __setattr__(self, name, value):
|
|
3671
|
+
if (
|
|
3672
|
+
type(self) is __dataclass__cls
|
|
3673
|
+
or name in __dataclass___setattr_frozen_fields
|
|
3674
|
+
):
|
|
3675
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
3676
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3677
|
+
|
|
3678
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3679
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3680
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3681
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3682
|
+
|
|
3683
|
+
__dataclass___delattr_frozen_fields = {
|
|
3684
|
+
'lst',
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
def __delattr__(self, name):
|
|
3688
|
+
if (
|
|
3689
|
+
type(self) is __dataclass__cls
|
|
3690
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3691
|
+
):
|
|
3692
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3693
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3694
|
+
|
|
3695
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3696
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3697
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3698
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3699
|
+
|
|
3700
|
+
def __hash__(self):
|
|
3701
|
+
return hash((
|
|
3702
|
+
self.lst,
|
|
3703
|
+
))
|
|
3704
|
+
|
|
3705
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3706
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3707
|
+
|
|
3708
|
+
def __init__(
|
|
3709
|
+
self,
|
|
3710
|
+
lst: __dataclass__init__fields__0__annotation,
|
|
3711
|
+
) -> __dataclass__None:
|
|
3712
|
+
__dataclass__object_setattr(self, 'lst', lst)
|
|
3713
|
+
__dataclass__init__init_fns__0(self)
|
|
3714
|
+
__dataclass__init__init_fns__1(self)
|
|
3715
|
+
__dataclass__init__init_fns__2(self)
|
|
3716
|
+
|
|
3717
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3718
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3719
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3720
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3721
|
+
|
|
3722
|
+
@__dataclass___recursive_repr()
|
|
3723
|
+
def __repr__(self):
|
|
3724
|
+
parts = []
|
|
3725
|
+
parts.append(f"lst={self.lst!r}")
|
|
3726
|
+
return (
|
|
3727
|
+
f"{self.__class__.__qualname__}("
|
|
3728
|
+
f"{', '.join(parts)}"
|
|
3729
|
+
f")"
|
|
3730
|
+
)
|
|
3731
|
+
|
|
3732
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3733
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3734
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3735
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3736
|
+
|
|
3737
|
+
return _process_dataclass
|
|
3738
|
+
|
|
3739
|
+
|
|
3740
|
+
@_register(
|
|
3741
|
+
plan_repr=(
|
|
3742
|
+
"Plans(tup=(CopyPlan(fields=('factory', 'fields_by_unmarshal_name', 'specials', 'defaults', 'embeds', 'embeds_b"
|
|
3743
|
+
"y_unmarshal_name', 'ignore_unknown')), EqPlan(fields=('factory', 'fields_by_unmarshal_name', 'specials', 'defa"
|
|
3744
|
+
"ults', 'embeds', 'embeds_by_unmarshal_name', 'ignore_unknown')), FrozenPlan(fields=('factory', 'fields_by_unma"
|
|
3745
|
+
"rshal_name', 'specials', 'defaults', 'embeds', 'embeds_by_unmarshal_name', 'ignore_unknown'), allow_dynamic_du"
|
|
3746
|
+
"nder_attrs=False), HashPlan(action='add', fields=('factory', 'fields_by_unmarshal_name', 'specials', 'defaults"
|
|
3747
|
+
"', 'embeds', 'embeds_by_unmarshal_name', 'ignore_unknown'), cache=False), InitPlan(fields=(InitPlan.Field(name"
|
|
3748
|
+
"='factory', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, "
|
|
3749
|
+
"override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(na"
|
|
3750
|
+
"me='fields_by_unmarshal_name', annotation=OpRef(name='init.fields.1.annotation'), default=None, default_factor"
|
|
3751
|
+
"y=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)"
|
|
3752
|
+
", InitPlan.Field(name='specials', annotation=OpRef(name='init.fields.2.annotation'), default=OpRef(name='init."
|
|
3753
|
+
"fields.2.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=Non"
|
|
3754
|
+
"e, validate=None, check_type=None), InitPlan.Field(name='defaults', annotation=OpRef(name='init.fields.3.annot"
|
|
3755
|
+
"ation'), default=OpRef(name='init.fields.3.default'), default_factory=None, init=True, override=False, field_t"
|
|
3756
|
+
"ype=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='embeds', annotation"
|
|
3757
|
+
"=OpRef(name='init.fields.4.annotation'), default=OpRef(name='init.fields.4.default'), default_factory=None, in"
|
|
3758
|
+
"it=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan"
|
|
3759
|
+
".Field(name='embeds_by_unmarshal_name', annotation=OpRef(name='init.fields.5.annotation'), default=OpRef(name="
|
|
3760
|
+
"'init.fields.5.default'), default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coer"
|
|
3761
|
+
"ce=None, validate=None, check_type=None), InitPlan.Field(name='ignore_unknown', annotation=OpRef(name='init.fi"
|
|
3762
|
+
"elds.6.annotation'), default=OpRef(name='init.fields.6.default'), default_factory=None, init=True, override=Fa"
|
|
3763
|
+
"lse, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='self', std_para"
|
|
3764
|
+
"ms=('factory', 'fields_by_unmarshal_name'), kw_only_params=('specials', 'defaults', 'embeds', 'embeds_by_unmar"
|
|
3765
|
+
"shal_name', 'ignore_unknown'), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()),"
|
|
3766
|
+
" ReprPlan(fields=(ReprPlan.Field(name='factory', kw_only=False, fn=None), ReprPlan.Field(name='fields_by_unmar"
|
|
3767
|
+
"shal_name', kw_only=False, fn=None), ReprPlan.Field(name='specials', kw_only=True, fn=None), ReprPlan.Field(na"
|
|
3768
|
+
"me='defaults', kw_only=True, fn=None), ReprPlan.Field(name='embeds', kw_only=True, fn=None), ReprPlan.Field(na"
|
|
3769
|
+
"me='embeds_by_unmarshal_name', kw_only=True, fn=None), ReprPlan.Field(name='ignore_unknown', kw_only=True, fn="
|
|
3770
|
+
"None)), id=False, terse=False, default_fn=None)))"
|
|
3771
|
+
),
|
|
3772
|
+
plan_repr_sha1='e171c973cbb0e4f2e398aefc90142b250947e15b',
|
|
3773
|
+
op_ref_idents=(
|
|
3774
|
+
'__dataclass__init__fields__0__annotation',
|
|
3775
|
+
'__dataclass__init__fields__1__annotation',
|
|
3776
|
+
'__dataclass__init__fields__2__annotation',
|
|
3777
|
+
'__dataclass__init__fields__2__default',
|
|
3778
|
+
'__dataclass__init__fields__3__annotation',
|
|
3779
|
+
'__dataclass__init__fields__3__default',
|
|
3780
|
+
'__dataclass__init__fields__4__annotation',
|
|
3781
|
+
'__dataclass__init__fields__4__default',
|
|
3782
|
+
'__dataclass__init__fields__5__annotation',
|
|
3783
|
+
'__dataclass__init__fields__5__default',
|
|
3784
|
+
'__dataclass__init__fields__6__annotation',
|
|
3785
|
+
'__dataclass__init__fields__6__default',
|
|
3786
|
+
),
|
|
3787
|
+
cls_names=(
|
|
3788
|
+
('ommlds.backends.anthropic.protocol._marshal', 'ObjectUnmarshaler'),
|
|
3789
|
+
),
|
|
3790
|
+
)
|
|
3791
|
+
def _process_dataclass__e171c973cbb0e4f2e398aefc90142b250947e15b():
|
|
3792
|
+
def _process_dataclass(
|
|
3793
|
+
*,
|
|
3794
|
+
__dataclass__cls,
|
|
3795
|
+
__dataclass__init__fields__0__annotation,
|
|
3796
|
+
__dataclass__init__fields__1__annotation,
|
|
3797
|
+
__dataclass__init__fields__2__annotation,
|
|
3798
|
+
__dataclass__init__fields__2__default,
|
|
3799
|
+
__dataclass__init__fields__3__annotation,
|
|
3800
|
+
__dataclass__init__fields__3__default,
|
|
3801
|
+
__dataclass__init__fields__4__annotation,
|
|
3802
|
+
__dataclass__init__fields__4__default,
|
|
3803
|
+
__dataclass__init__fields__5__annotation,
|
|
3804
|
+
__dataclass__init__fields__5__default,
|
|
3805
|
+
__dataclass__init__fields__6__annotation,
|
|
3806
|
+
__dataclass__init__fields__6__default,
|
|
3807
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
3808
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
3809
|
+
__dataclass__FnValidationError, # noqa
|
|
3810
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3811
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3812
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3813
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3814
|
+
__dataclass__None=None, # noqa
|
|
3815
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3816
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3817
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3818
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3819
|
+
__dataclass__property=property, # noqa
|
|
3820
|
+
):
|
|
3821
|
+
def __copy__(self):
|
|
3822
|
+
if self.__class__ is not __dataclass__cls:
|
|
3823
|
+
raise TypeError(self)
|
|
3824
|
+
return __dataclass__cls( # noqa
|
|
3825
|
+
factory=self.factory,
|
|
3826
|
+
fields_by_unmarshal_name=self.fields_by_unmarshal_name,
|
|
3827
|
+
specials=self.specials,
|
|
3828
|
+
defaults=self.defaults,
|
|
3829
|
+
embeds=self.embeds,
|
|
3830
|
+
embeds_by_unmarshal_name=self.embeds_by_unmarshal_name,
|
|
3831
|
+
ignore_unknown=self.ignore_unknown,
|
|
3832
|
+
)
|
|
3833
|
+
|
|
3834
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
3835
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
3836
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
3837
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
3838
|
+
|
|
3839
|
+
def __eq__(self, other):
|
|
3840
|
+
if self is other:
|
|
3841
|
+
return True
|
|
3842
|
+
if self.__class__ is not other.__class__:
|
|
3843
|
+
return NotImplemented
|
|
3844
|
+
return (
|
|
3845
|
+
self.factory == other.factory and
|
|
3846
|
+
self.fields_by_unmarshal_name == other.fields_by_unmarshal_name and
|
|
3847
|
+
self.specials == other.specials and
|
|
3848
|
+
self.defaults == other.defaults and
|
|
3849
|
+
self.embeds == other.embeds and
|
|
3850
|
+
self.embeds_by_unmarshal_name == other.embeds_by_unmarshal_name and
|
|
3851
|
+
self.ignore_unknown == other.ignore_unknown
|
|
3852
|
+
)
|
|
3853
|
+
|
|
3854
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
3855
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
3856
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
3857
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
3858
|
+
|
|
3859
|
+
__dataclass___setattr_frozen_fields = {
|
|
3860
|
+
'factory',
|
|
3861
|
+
'fields_by_unmarshal_name',
|
|
3862
|
+
'specials',
|
|
3863
|
+
'defaults',
|
|
3864
|
+
'embeds',
|
|
3865
|
+
'embeds_by_unmarshal_name',
|
|
3866
|
+
'ignore_unknown',
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
def __setattr__(self, name, value):
|
|
3870
|
+
if (
|
|
3871
|
+
type(self) is __dataclass__cls
|
|
3872
|
+
or name in __dataclass___setattr_frozen_fields
|
|
3873
|
+
):
|
|
3874
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
3875
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
3876
|
+
|
|
3877
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
3878
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
3879
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
3880
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
3881
|
+
|
|
3882
|
+
__dataclass___delattr_frozen_fields = {
|
|
3883
|
+
'factory',
|
|
3884
|
+
'fields_by_unmarshal_name',
|
|
3885
|
+
'specials',
|
|
3886
|
+
'defaults',
|
|
3887
|
+
'embeds',
|
|
3888
|
+
'embeds_by_unmarshal_name',
|
|
3889
|
+
'ignore_unknown',
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
def __delattr__(self, name):
|
|
3893
|
+
if (
|
|
3894
|
+
type(self) is __dataclass__cls
|
|
3895
|
+
or name in __dataclass___delattr_frozen_fields
|
|
3896
|
+
):
|
|
3897
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
3898
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
3899
|
+
|
|
3900
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
3901
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
3902
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
3903
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
3904
|
+
|
|
3905
|
+
def __hash__(self):
|
|
3906
|
+
return hash((
|
|
3907
|
+
self.factory,
|
|
3908
|
+
self.fields_by_unmarshal_name,
|
|
3909
|
+
self.specials,
|
|
3910
|
+
self.defaults,
|
|
3911
|
+
self.embeds,
|
|
3912
|
+
self.embeds_by_unmarshal_name,
|
|
3913
|
+
self.ignore_unknown,
|
|
3914
|
+
))
|
|
3915
|
+
|
|
3916
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
3917
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
3918
|
+
|
|
3919
|
+
def __init__(
|
|
3920
|
+
self,
|
|
3921
|
+
factory: __dataclass__init__fields__0__annotation,
|
|
3922
|
+
fields_by_unmarshal_name: __dataclass__init__fields__1__annotation,
|
|
3923
|
+
*,
|
|
3924
|
+
specials: __dataclass__init__fields__2__annotation = __dataclass__init__fields__2__default,
|
|
3925
|
+
defaults: __dataclass__init__fields__3__annotation = __dataclass__init__fields__3__default,
|
|
3926
|
+
embeds: __dataclass__init__fields__4__annotation = __dataclass__init__fields__4__default,
|
|
3927
|
+
embeds_by_unmarshal_name: __dataclass__init__fields__5__annotation = __dataclass__init__fields__5__default,
|
|
3928
|
+
ignore_unknown: __dataclass__init__fields__6__annotation = __dataclass__init__fields__6__default,
|
|
3929
|
+
) -> __dataclass__None:
|
|
3930
|
+
__dataclass__object_setattr(self, 'factory', factory)
|
|
3931
|
+
__dataclass__object_setattr(self, 'fields_by_unmarshal_name', fields_by_unmarshal_name)
|
|
3932
|
+
__dataclass__object_setattr(self, 'specials', specials)
|
|
3933
|
+
__dataclass__object_setattr(self, 'defaults', defaults)
|
|
3934
|
+
__dataclass__object_setattr(self, 'embeds', embeds)
|
|
3935
|
+
__dataclass__object_setattr(self, 'embeds_by_unmarshal_name', embeds_by_unmarshal_name)
|
|
3936
|
+
__dataclass__object_setattr(self, 'ignore_unknown', ignore_unknown)
|
|
3937
|
+
|
|
3938
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
3939
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
3940
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
3941
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
3942
|
+
|
|
3943
|
+
@__dataclass___recursive_repr()
|
|
3944
|
+
def __repr__(self):
|
|
3945
|
+
parts = []
|
|
3946
|
+
parts.append(f"factory={self.factory!r}")
|
|
3947
|
+
parts.append(f"fields_by_unmarshal_name={self.fields_by_unmarshal_name!r}")
|
|
3948
|
+
parts.append(f"specials={self.specials!r}")
|
|
3949
|
+
parts.append(f"defaults={self.defaults!r}")
|
|
3950
|
+
parts.append(f"embeds={self.embeds!r}")
|
|
3951
|
+
parts.append(f"embeds_by_unmarshal_name={self.embeds_by_unmarshal_name!r}")
|
|
3952
|
+
parts.append(f"ignore_unknown={self.ignore_unknown!r}")
|
|
3953
|
+
return (
|
|
3954
|
+
f"{self.__class__.__qualname__}("
|
|
3955
|
+
f"{', '.join(parts)}"
|
|
3956
|
+
f")"
|
|
3957
|
+
)
|
|
3958
|
+
|
|
3959
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
3960
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
3961
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
3962
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
3963
|
+
|
|
3964
|
+
return _process_dataclass
|
|
3965
|
+
|
|
3966
|
+
|
|
3967
|
+
@_register(
|
|
3968
|
+
plan_repr=(
|
|
3969
|
+
"Plans(tup=(CopyPlan(fields=()), EqPlan(fields=()), FrozenPlan(fields=(), allow_dynamic_dunder_attrs=False), Ha"
|
|
3970
|
+
"shPlan(action='add', fields=(), cache=False), InitPlan(fields=(), self_param='self', std_params=(), kw_only_pa"
|
|
3971
|
+
"rams=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(), i"
|
|
3972
|
+
"d=False, terse=False, default_fn=None)))"
|
|
3973
|
+
),
|
|
3974
|
+
plan_repr_sha1='e1f7edfe11f2b721d6a656c46e698fedc95461bb',
|
|
3975
|
+
op_ref_idents=(),
|
|
3976
|
+
cls_names=(
|
|
3977
|
+
('ommlds.backends.anthropic.protocol', 'Content.EphemeralCacheControl'),
|
|
3978
|
+
),
|
|
3979
|
+
)
|
|
3980
|
+
def _process_dataclass__e1f7edfe11f2b721d6a656c46e698fedc95461bb():
|
|
3981
|
+
def _process_dataclass(
|
|
3982
|
+
*,
|
|
3983
|
+
__dataclass__cls,
|
|
3984
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
3985
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
3986
|
+
__dataclass__FnValidationError, # noqa
|
|
3987
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
3988
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
3989
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
3990
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
3991
|
+
__dataclass__None=None, # noqa
|
|
3992
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
3993
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
3994
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
3995
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
3996
|
+
__dataclass__property=property, # noqa
|
|
3997
|
+
):
|
|
3998
|
+
def __copy__(self):
|
|
3999
|
+
if self.__class__ is not __dataclass__cls:
|
|
4000
|
+
raise TypeError(self)
|
|
4001
|
+
return __dataclass__cls() # noqa
|
|
4002
|
+
|
|
4003
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
4004
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
4005
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
4006
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
4007
|
+
|
|
4008
|
+
def __eq__(self, other):
|
|
4009
|
+
if self is other:
|
|
4010
|
+
return True
|
|
4011
|
+
if self.__class__ is not other.__class__:
|
|
4012
|
+
return NotImplemented
|
|
4013
|
+
return True
|
|
4014
|
+
|
|
4015
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
4016
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
4017
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
4018
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
4019
|
+
|
|
4020
|
+
def __setattr__(self, name, value):
|
|
4021
|
+
if (
|
|
4022
|
+
type(self) is __dataclass__cls
|
|
4023
|
+
):
|
|
4024
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
4025
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
4026
|
+
|
|
4027
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
4028
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
4029
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
4030
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
4031
|
+
|
|
4032
|
+
def __delattr__(self, name):
|
|
4033
|
+
if (
|
|
4034
|
+
type(self) is __dataclass__cls
|
|
4035
|
+
):
|
|
4036
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
4037
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
4038
|
+
|
|
4039
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
4040
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
4041
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
4042
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
4043
|
+
|
|
4044
|
+
def __hash__(self):
|
|
4045
|
+
return hash(())
|
|
4046
|
+
|
|
4047
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
4048
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
4049
|
+
|
|
4050
|
+
def __init__(
|
|
4051
|
+
self,
|
|
4052
|
+
) -> __dataclass__None:
|
|
4053
|
+
pass
|
|
4054
|
+
|
|
4055
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
4056
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
4057
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
4058
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
4059
|
+
|
|
4060
|
+
@__dataclass___recursive_repr()
|
|
4061
|
+
def __repr__(self):
|
|
4062
|
+
parts = []
|
|
4063
|
+
return (
|
|
4064
|
+
f"{self.__class__.__qualname__}("
|
|
4065
|
+
f"{', '.join(parts)}"
|
|
4066
|
+
f")"
|
|
4067
|
+
)
|
|
4068
|
+
|
|
4069
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
4070
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
4071
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
4072
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
4073
|
+
|
|
4074
|
+
return _process_dataclass
|
|
4075
|
+
|
|
4076
|
+
|
|
4077
|
+
@_register(
|
|
4078
|
+
plan_repr=(
|
|
4079
|
+
"Plans(tup=(CopyPlan(fields=('tys', 'x')), EqPlan(fields=('tys', 'x')), FrozenPlan(fields=('tys', 'x'), allow_d"
|
|
4080
|
+
"ynamic_dunder_attrs=False), HashPlan(action='add', fields=('tys', 'x'), cache=False), InitPlan(fields=(InitPla"
|
|
4081
|
+
"n.Field(name='tys', annotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, ini"
|
|
4082
|
+
"t=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan."
|
|
4083
|
+
"Field(name='x', annotation=OpRef(name='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default')"
|
|
4084
|
+
", default_factory=None, init=True, override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, "
|
|
4085
|
+
"check_type=None)), self_param='self', std_params=('tys', 'x'), kw_only_params=(), frozen=True, slots=False, po"
|
|
4086
|
+
"st_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='tys', kw_only=False,"
|
|
4087
|
+
" fn=None), ReprPlan.Field(name='x', kw_only=False, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
4088
|
+
),
|
|
4089
|
+
plan_repr_sha1='f2f290d474e5d287d38623cbc2f347779aa70a7a',
|
|
4090
|
+
op_ref_idents=(
|
|
4091
|
+
'__dataclass__init__fields__0__annotation',
|
|
4092
|
+
'__dataclass__init__fields__1__annotation',
|
|
4093
|
+
'__dataclass__init__fields__1__default',
|
|
4094
|
+
),
|
|
4095
|
+
cls_names=(
|
|
4096
|
+
('ommlds.backends.anthropic.protocol._marshal', 'PrimitiveUnionMarshaler'),
|
|
4097
|
+
('ommlds.backends.anthropic.protocol._marshal', 'PrimitiveUnionUnmarshaler'),
|
|
4098
|
+
),
|
|
4099
|
+
)
|
|
4100
|
+
def _process_dataclass__f2f290d474e5d287d38623cbc2f347779aa70a7a():
|
|
4101
|
+
def _process_dataclass(
|
|
4102
|
+
*,
|
|
4103
|
+
__dataclass__cls,
|
|
4104
|
+
__dataclass__init__fields__0__annotation,
|
|
4105
|
+
__dataclass__init__fields__1__annotation,
|
|
4106
|
+
__dataclass__init__fields__1__default,
|
|
4107
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
4108
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
4109
|
+
__dataclass__FnValidationError, # noqa
|
|
4110
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
4111
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
4112
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
4113
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
4114
|
+
__dataclass__None=None, # noqa
|
|
4115
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
4116
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
4117
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
4118
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
4119
|
+
__dataclass__property=property, # noqa
|
|
4120
|
+
):
|
|
4121
|
+
def __copy__(self):
|
|
4122
|
+
if self.__class__ is not __dataclass__cls:
|
|
4123
|
+
raise TypeError(self)
|
|
4124
|
+
return __dataclass__cls( # noqa
|
|
4125
|
+
tys=self.tys,
|
|
4126
|
+
x=self.x,
|
|
4127
|
+
)
|
|
4128
|
+
|
|
4129
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
4130
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
4131
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
4132
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
4133
|
+
|
|
4134
|
+
def __eq__(self, other):
|
|
4135
|
+
if self is other:
|
|
4136
|
+
return True
|
|
4137
|
+
if self.__class__ is not other.__class__:
|
|
4138
|
+
return NotImplemented
|
|
4139
|
+
return (
|
|
4140
|
+
self.tys == other.tys and
|
|
4141
|
+
self.x == other.x
|
|
4142
|
+
)
|
|
4143
|
+
|
|
4144
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
4145
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
4146
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
4147
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
4148
|
+
|
|
4149
|
+
__dataclass___setattr_frozen_fields = {
|
|
4150
|
+
'tys',
|
|
4151
|
+
'x',
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
def __setattr__(self, name, value):
|
|
4155
|
+
if (
|
|
4156
|
+
type(self) is __dataclass__cls
|
|
4157
|
+
or name in __dataclass___setattr_frozen_fields
|
|
4158
|
+
):
|
|
4159
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
4160
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
4161
|
+
|
|
4162
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
4163
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
4164
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
4165
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
4166
|
+
|
|
4167
|
+
__dataclass___delattr_frozen_fields = {
|
|
4168
|
+
'tys',
|
|
4169
|
+
'x',
|
|
4170
|
+
}
|
|
4171
|
+
|
|
4172
|
+
def __delattr__(self, name):
|
|
4173
|
+
if (
|
|
4174
|
+
type(self) is __dataclass__cls
|
|
4175
|
+
or name in __dataclass___delattr_frozen_fields
|
|
4176
|
+
):
|
|
4177
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
4178
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
4179
|
+
|
|
4180
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
4181
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
4182
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
4183
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
4184
|
+
|
|
4185
|
+
def __hash__(self):
|
|
4186
|
+
return hash((
|
|
4187
|
+
self.tys,
|
|
4188
|
+
self.x,
|
|
4189
|
+
))
|
|
4190
|
+
|
|
4191
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
4192
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
4193
|
+
|
|
4194
|
+
def __init__(
|
|
4195
|
+
self,
|
|
4196
|
+
tys: __dataclass__init__fields__0__annotation,
|
|
4197
|
+
x: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
4198
|
+
) -> __dataclass__None:
|
|
4199
|
+
__dataclass__object_setattr(self, 'tys', tys)
|
|
4200
|
+
__dataclass__object_setattr(self, 'x', x)
|
|
4201
|
+
|
|
4202
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
4203
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
4204
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
4205
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
4206
|
+
|
|
4207
|
+
@__dataclass___recursive_repr()
|
|
4208
|
+
def __repr__(self):
|
|
4209
|
+
parts = []
|
|
4210
|
+
parts.append(f"tys={self.tys!r}")
|
|
4211
|
+
parts.append(f"x={self.x!r}")
|
|
4212
|
+
return (
|
|
4213
|
+
f"{self.__class__.__qualname__}("
|
|
4214
|
+
f"{', '.join(parts)}"
|
|
4215
|
+
f")"
|
|
4216
|
+
)
|
|
4217
|
+
|
|
4218
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
4219
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
4220
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
4221
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
4222
|
+
|
|
4223
|
+
return _process_dataclass
|
|
4224
|
+
|
|
4225
|
+
|
|
4226
|
+
@_register(
|
|
4227
|
+
plan_repr=(
|
|
4228
|
+
"Plans(tup=(CopyPlan(fields=('unknown', 'source')), EqPlan(fields=('unknown', 'source')), FrozenPlan(fields=('u"
|
|
4229
|
+
"nknown', 'source'), allow_dynamic_dunder_attrs=False), HashPlan(action='add', fields=('unknown', 'source'), ca"
|
|
4230
|
+
"che=False), InitPlan(fields=(InitPlan.Field(name='unknown', annotation=OpRef(name='init.fields.0.annotation'),"
|
|
4231
|
+
" default=OpRef(name='init.fields.0.default'), default_factory=None, init=True, override=False, field_type=Fiel"
|
|
4232
|
+
"dType.INSTANCE, coerce=None, validate=None, check_type=None), InitPlan.Field(name='source', annotation=OpRef(n"
|
|
4233
|
+
"ame='init.fields.1.annotation'), default=OpRef(name='init.fields.1.default'), default_factory=None, init=True,"
|
|
4234
|
+
" override=False, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None)), self_param='sel"
|
|
4235
|
+
"f', std_params=(), kw_only_params=('unknown', 'source'), frozen=True, slots=False, post_init_params=None, init"
|
|
4236
|
+
"_fns=(), validate_fns=()), ReprPlan(fields=(ReprPlan.Field(name='unknown', kw_only=True, fn=None), ReprPlan.Fi"
|
|
4237
|
+
"eld(name='source', kw_only=True, fn=None)), id=False, terse=False, default_fn=None)))"
|
|
4238
|
+
),
|
|
4239
|
+
plan_repr_sha1='ffbfe43830279fbce3d0d2196bd9c1e581bc796f',
|
|
4240
|
+
op_ref_idents=(
|
|
4241
|
+
'__dataclass__init__fields__0__annotation',
|
|
4242
|
+
'__dataclass__init__fields__0__default',
|
|
4243
|
+
'__dataclass__init__fields__1__annotation',
|
|
4244
|
+
'__dataclass__init__fields__1__default',
|
|
4245
|
+
),
|
|
4246
|
+
cls_names=(
|
|
4247
|
+
('ommlds.backends.anthropic.protocol', 'ObjectSpecials'),
|
|
4248
|
+
),
|
|
4249
|
+
)
|
|
4250
|
+
def _process_dataclass__ffbfe43830279fbce3d0d2196bd9c1e581bc796f():
|
|
4251
|
+
def _process_dataclass(
|
|
4252
|
+
*,
|
|
4253
|
+
__dataclass__cls,
|
|
4254
|
+
__dataclass__init__fields__0__annotation,
|
|
4255
|
+
__dataclass__init__fields__0__default,
|
|
4256
|
+
__dataclass__init__fields__1__annotation,
|
|
4257
|
+
__dataclass__init__fields__1__default,
|
|
4258
|
+
__dataclass__FieldFnValidationError, # noqa
|
|
4259
|
+
__dataclass__FieldTypeValidationError, # noqa
|
|
4260
|
+
__dataclass__FnValidationError, # noqa
|
|
4261
|
+
__dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
|
|
4262
|
+
__dataclass__FunctionType=types.FunctionType, # noqa
|
|
4263
|
+
__dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
|
|
4264
|
+
__dataclass__MISSING=dataclasses.MISSING, # noqa
|
|
4265
|
+
__dataclass__None=None, # noqa
|
|
4266
|
+
__dataclass__TypeError=TypeError, # noqa
|
|
4267
|
+
__dataclass___recursive_repr=reprlib.recursive_repr, # noqa
|
|
4268
|
+
__dataclass__isinstance=isinstance, # noqa
|
|
4269
|
+
__dataclass__object_setattr=object.__setattr__, # noqa
|
|
4270
|
+
__dataclass__property=property, # noqa
|
|
4271
|
+
):
|
|
4272
|
+
def __copy__(self):
|
|
4273
|
+
if self.__class__ is not __dataclass__cls:
|
|
4274
|
+
raise TypeError(self)
|
|
4275
|
+
return __dataclass__cls( # noqa
|
|
4276
|
+
unknown=self.unknown,
|
|
4277
|
+
source=self.source,
|
|
4278
|
+
)
|
|
4279
|
+
|
|
4280
|
+
__copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
|
|
4281
|
+
if '__copy__' in __dataclass__cls.__dict__:
|
|
4282
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
|
|
4283
|
+
setattr(__dataclass__cls, '__copy__', __copy__)
|
|
4284
|
+
|
|
4285
|
+
def __eq__(self, other):
|
|
4286
|
+
if self is other:
|
|
4287
|
+
return True
|
|
4288
|
+
if self.__class__ is not other.__class__:
|
|
4289
|
+
return NotImplemented
|
|
4290
|
+
return (
|
|
4291
|
+
self.unknown == other.unknown and
|
|
4292
|
+
self.source == other.source
|
|
4293
|
+
)
|
|
4294
|
+
|
|
4295
|
+
__eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
|
|
4296
|
+
if '__eq__' in __dataclass__cls.__dict__:
|
|
4297
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
|
|
4298
|
+
setattr(__dataclass__cls, '__eq__', __eq__)
|
|
4299
|
+
|
|
4300
|
+
__dataclass___setattr_frozen_fields = {
|
|
4301
|
+
'unknown',
|
|
4302
|
+
'source',
|
|
4303
|
+
}
|
|
4304
|
+
|
|
4305
|
+
def __setattr__(self, name, value):
|
|
4306
|
+
if (
|
|
4307
|
+
type(self) is __dataclass__cls
|
|
4308
|
+
or name in __dataclass___setattr_frozen_fields
|
|
4309
|
+
):
|
|
4310
|
+
raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
|
|
4311
|
+
super(__dataclass__cls, self).__setattr__(name, value)
|
|
4312
|
+
|
|
4313
|
+
__setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
|
|
4314
|
+
if '__setattr__' in __dataclass__cls.__dict__:
|
|
4315
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
|
|
4316
|
+
setattr(__dataclass__cls, '__setattr__', __setattr__)
|
|
4317
|
+
|
|
4318
|
+
__dataclass___delattr_frozen_fields = {
|
|
4319
|
+
'unknown',
|
|
4320
|
+
'source',
|
|
4321
|
+
}
|
|
4322
|
+
|
|
4323
|
+
def __delattr__(self, name):
|
|
4324
|
+
if (
|
|
4325
|
+
type(self) is __dataclass__cls
|
|
4326
|
+
or name in __dataclass___delattr_frozen_fields
|
|
4327
|
+
):
|
|
4328
|
+
raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
|
|
4329
|
+
super(__dataclass__cls, self).__delattr__(name)
|
|
4330
|
+
|
|
4331
|
+
__delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
|
|
4332
|
+
if '__delattr__' in __dataclass__cls.__dict__:
|
|
4333
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
|
|
4334
|
+
setattr(__dataclass__cls, '__delattr__', __delattr__)
|
|
4335
|
+
|
|
4336
|
+
def __hash__(self):
|
|
4337
|
+
return hash((
|
|
4338
|
+
self.unknown,
|
|
4339
|
+
self.source,
|
|
4340
|
+
))
|
|
4341
|
+
|
|
4342
|
+
__hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
|
|
4343
|
+
setattr(__dataclass__cls, '__hash__', __hash__)
|
|
4344
|
+
|
|
4345
|
+
def __init__(
|
|
4346
|
+
self,
|
|
4347
|
+
*,
|
|
4348
|
+
unknown: __dataclass__init__fields__0__annotation = __dataclass__init__fields__0__default,
|
|
4349
|
+
source: __dataclass__init__fields__1__annotation = __dataclass__init__fields__1__default,
|
|
4350
|
+
) -> __dataclass__None:
|
|
4351
|
+
__dataclass__object_setattr(self, 'unknown', unknown)
|
|
4352
|
+
__dataclass__object_setattr(self, 'source', source)
|
|
4353
|
+
|
|
4354
|
+
__init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
|
|
4355
|
+
if '__init__' in __dataclass__cls.__dict__:
|
|
4356
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
|
|
4357
|
+
setattr(__dataclass__cls, '__init__', __init__)
|
|
4358
|
+
|
|
4359
|
+
@__dataclass___recursive_repr()
|
|
4360
|
+
def __repr__(self):
|
|
4361
|
+
parts = []
|
|
4362
|
+
parts.append(f"unknown={self.unknown!r}")
|
|
4363
|
+
parts.append(f"source={self.source!r}")
|
|
4364
|
+
return (
|
|
4365
|
+
f"{self.__class__.__qualname__}("
|
|
4366
|
+
f"{', '.join(parts)}"
|
|
4367
|
+
f")"
|
|
4368
|
+
)
|
|
4369
|
+
|
|
4370
|
+
__repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
|
|
4371
|
+
if '__repr__' in __dataclass__cls.__dict__:
|
|
4372
|
+
raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
|
|
4373
|
+
setattr(__dataclass__cls, '__repr__', __repr__)
|
|
4374
|
+
|
|
4375
|
+
return _process_dataclass
|