|
1 | 1 | # This file was auto-generated by Fern from our API Definition. |
2 | 2 |
|
3 | | -<<<<<<< HEAD |
4 | | -import datetime as dt |
5 | | -import typing |
6 | | - |
7 | | -from ....core.datetime_utils import serialize_datetime |
8 | | -from ....core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1 |
9 | | -======= |
10 | 3 | import typing |
11 | 4 |
|
12 | 5 | import pydantic |
13 | 6 | import typing_extensions |
14 | 7 | from ...core.serialization import FieldMetadata |
15 | | ->>>>>>> 4bf1ac17 (push) |
16 | 8 | from .base_score import BaseScore |
17 | 9 |
|
18 | 10 |
|
19 | 11 | class CorrectionScore(BaseScore): |
20 | | -<<<<<<< HEAD |
21 | | - value: float = pydantic_v1.Field() |
22 | | -======= |
23 | 12 | value: float = pydantic.Field() |
24 | | ->>>>>>> 4bf1ac17 (push) |
25 | 13 | """ |
26 | 14 | The numeric value of the score. Always 0 for correction scores. |
27 | 15 | """ |
28 | 16 |
|
29 | | -<<<<<<< HEAD |
30 | | - string_value: str = pydantic_v1.Field(alias="stringValue") |
31 | | -======= |
32 | 17 | string_value: typing_extensions.Annotated[ |
33 | 18 | str, FieldMetadata(alias="stringValue") |
34 | 19 | ] = pydantic.Field() |
35 | | ->>>>>>> 4bf1ac17 (push) |
36 | 20 | """ |
37 | 21 | The string representation of the correction content |
38 | 22 | """ |
39 | 23 |
|
40 | | -<<<<<<< HEAD |
41 | | - def json(self, **kwargs: typing.Any) -> str: |
42 | | - kwargs_with_defaults: typing.Any = { |
43 | | - "by_alias": True, |
44 | | - "exclude_unset": True, |
45 | | - **kwargs, |
46 | | - } |
47 | | - return super().json(**kwargs_with_defaults) |
48 | | - |
49 | | - def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: |
50 | | - kwargs_with_defaults_exclude_unset: typing.Any = { |
51 | | - "by_alias": True, |
52 | | - "exclude_unset": True, |
53 | | - **kwargs, |
54 | | - } |
55 | | - kwargs_with_defaults_exclude_none: typing.Any = { |
56 | | - "by_alias": True, |
57 | | - "exclude_none": True, |
58 | | - **kwargs, |
59 | | - } |
60 | | - |
61 | | - return deep_union_pydantic_dicts( |
62 | | - super().dict(**kwargs_with_defaults_exclude_unset), |
63 | | - super().dict(**kwargs_with_defaults_exclude_none), |
64 | | - ) |
65 | | - |
66 | | - class Config: |
67 | | - frozen = True |
68 | | - smart_union = True |
69 | | - allow_population_by_field_name = True |
70 | | - populate_by_name = True |
71 | | - extra = pydantic_v1.Extra.allow |
72 | | - json_encoders = {dt.datetime: serialize_datetime} |
73 | | -======= |
74 | 24 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( |
75 | 25 | extra="allow", frozen=True |
76 | 26 | ) |
77 | | ->>>>>>> 4bf1ac17 (push) |
0 commit comments