agenta 0.24.1__py3-none-any.whl → 0.24.2__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.
Potentially problematic release.
This version of agenta might be problematic. Click here for more details.
- agenta/cli/variant_commands.py +15 -10
- agenta/client/Readme.md +72 -64
- agenta/client/api.py +1 -1
- agenta/client/backend/__init__.py +14 -9
- agenta/client/backend/apps/client.py +1669 -0
- agenta/client/backend/bases/client.py +190 -0
- agenta/client/backend/client.py +2102 -868
- agenta/client/backend/configs/client.py +598 -0
- agenta/client/backend/containers/client.py +638 -0
- agenta/client/backend/{resources/containers → containers}/types/container_templates_response.py +1 -2
- agenta/client/backend/core/__init__.py +29 -0
- agenta/client/backend/core/client_wrapper.py +42 -9
- agenta/client/backend/core/datetime_utils.py +1 -1
- agenta/client/backend/core/file.py +43 -0
- agenta/client/backend/core/http_client.py +553 -0
- agenta/client/backend/core/jsonable_encoder.py +33 -39
- agenta/client/backend/core/pydantic_utilities.py +212 -0
- agenta/client/backend/core/query_encoder.py +60 -0
- agenta/client/backend/core/remove_none_from_dict.py +2 -2
- agenta/client/backend/core/request_options.py +32 -0
- agenta/client/backend/core/serialization.py +179 -0
- agenta/client/backend/environments/client.py +190 -0
- agenta/client/backend/evaluations/client.py +1462 -0
- agenta/client/backend/evaluators/client.py +911 -0
- agenta/client/backend/observability/client.py +1271 -0
- agenta/client/backend/testsets/client.py +1132 -0
- agenta/client/backend/types/__init__.py +8 -6
- agenta/client/backend/types/aggregated_result.py +14 -29
- agenta/client/backend/types/aggregated_result_evaluator_config.py +1 -2
- agenta/client/backend/types/app.py +13 -28
- agenta/client/backend/types/app_variant_response.py +21 -37
- agenta/client/backend/types/app_variant_revision.py +17 -32
- agenta/client/backend/types/base_output.py +13 -28
- agenta/client/backend/types/body_import_testset.py +16 -31
- agenta/client/backend/types/config_db.py +16 -31
- agenta/client/backend/types/correct_answer.py +22 -0
- agenta/client/backend/types/create_app_output.py +13 -28
- agenta/client/backend/types/create_span.py +33 -50
- agenta/client/backend/types/create_trace_response.py +16 -31
- agenta/client/backend/types/docker_env_vars.py +13 -28
- agenta/client/backend/types/environment_output.py +21 -36
- agenta/client/backend/types/environment_output_extended.py +21 -36
- agenta/client/backend/types/environment_revision.py +18 -33
- agenta/client/backend/types/error.py +16 -31
- agenta/client/backend/types/evaluation.py +20 -34
- agenta/client/backend/types/evaluation_scenario.py +18 -33
- agenta/client/backend/types/evaluation_scenario_input.py +16 -31
- agenta/client/backend/types/evaluation_scenario_output.py +18 -33
- agenta/client/backend/types/evaluation_scenario_result.py +14 -29
- agenta/client/backend/types/evaluation_scenario_score_update.py +13 -28
- agenta/client/backend/types/evaluation_status_enum.py +11 -33
- agenta/client/backend/types/evaluation_type.py +3 -21
- agenta/client/backend/types/evaluator.py +18 -32
- agenta/client/backend/types/evaluator_config.py +20 -33
- agenta/client/backend/types/get_config_response.py +16 -31
- agenta/client/backend/types/http_validation_error.py +14 -29
- agenta/client/backend/types/human_evaluation.py +17 -32
- agenta/client/backend/types/human_evaluation_scenario.py +21 -37
- agenta/client/backend/types/human_evaluation_scenario_input.py +13 -28
- agenta/client/backend/types/human_evaluation_scenario_output.py +13 -28
- agenta/client/backend/types/human_evaluation_scenario_update.py +26 -41
- agenta/client/backend/types/human_evaluation_update.py +14 -29
- agenta/client/backend/types/image.py +18 -33
- agenta/client/backend/types/invite_request.py +13 -28
- agenta/client/backend/types/list_api_keys_response.py +18 -33
- agenta/client/backend/types/llm_run_rate_limit.py +13 -28
- agenta/client/backend/types/llm_tokens.py +16 -31
- agenta/client/backend/types/lm_providers_enum.py +21 -0
- agenta/client/backend/types/new_human_evaluation.py +13 -28
- agenta/client/backend/types/new_testset.py +16 -31
- agenta/client/backend/types/organization.py +22 -36
- agenta/client/backend/types/organization_output.py +13 -28
- agenta/client/backend/types/outputs.py +5 -0
- agenta/client/backend/types/permission.py +36 -137
- agenta/client/backend/types/result.py +17 -32
- agenta/client/backend/types/simple_evaluation_output.py +13 -28
- agenta/client/backend/types/span.py +23 -38
- agenta/client/backend/types/span_detail.py +26 -40
- agenta/client/backend/types/span_status_code.py +1 -25
- agenta/client/backend/types/span_variant.py +16 -31
- agenta/client/backend/types/template.py +14 -29
- agenta/client/backend/types/template_image_info.py +21 -35
- agenta/client/backend/types/test_set_output_response.py +16 -32
- agenta/client/backend/types/test_set_simple_response.py +13 -28
- agenta/client/backend/types/trace_detail.py +26 -40
- agenta/client/backend/types/update_app_output.py +22 -0
- agenta/client/backend/types/uri.py +13 -28
- agenta/client/backend/types/validation_error.py +13 -28
- agenta/client/backend/types/variant_action.py +14 -29
- agenta/client/backend/types/variant_action_enum.py +1 -19
- agenta/client/backend/types/with_pagination.py +14 -30
- agenta/client/backend/types/workspace_member_response.py +14 -29
- agenta/client/backend/types/workspace_permission.py +18 -33
- agenta/client/backend/types/workspace_response.py +20 -35
- agenta/client/backend/types/workspace_role.py +11 -37
- agenta/client/backend/types/workspace_role_response.py +17 -32
- agenta/client/backend/variants/client.py +1447 -0
- agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py +8 -0
- agenta/sdk/tracing/llm_tracing.py +10 -12
- {agenta-0.24.1.dist-info → agenta-0.24.2.dist-info}/METADATA +1 -1
- agenta-0.24.2.dist-info/RECORD +175 -0
- agenta/client/backend/resources/__init__.py +0 -31
- agenta/client/backend/resources/apps/client.py +0 -977
- agenta/client/backend/resources/bases/client.py +0 -127
- agenta/client/backend/resources/configs/client.py +0 -377
- agenta/client/backend/resources/containers/client.py +0 -383
- agenta/client/backend/resources/environments/client.py +0 -131
- agenta/client/backend/resources/evaluations/client.py +0 -1008
- agenta/client/backend/resources/evaluators/client.py +0 -594
- agenta/client/backend/resources/observability/client.py +0 -1187
- agenta/client/backend/resources/testsets/client.py +0 -689
- agenta/client/backend/resources/variants/client.py +0 -796
- agenta/client/backend/resources/variants/types/add_variant_from_base_and_config_response.py +0 -7
- agenta/client/backend/types/evaluation_webhook.py +0 -36
- agenta/client/backend/types/feedback.py +0 -40
- agenta/client/backend/types/span_kind.py +0 -49
- agenta-0.24.1.dist-info/RECORD +0 -169
- /agenta/client/backend/{resources/apps → apps}/__init__.py +0 -0
- /agenta/client/backend/{resources/bases → bases}/__init__.py +0 -0
- /agenta/client/backend/{resources/configs → configs}/__init__.py +0 -0
- /agenta/client/backend/{resources/containers → containers}/__init__.py +0 -0
- /agenta/client/backend/{resources/containers → containers}/types/__init__.py +0 -0
- /agenta/client/backend/{resources/environments → environments}/__init__.py +0 -0
- /agenta/client/backend/{resources/evaluations → evaluations}/__init__.py +0 -0
- /agenta/client/backend/{resources/evaluators → evaluators}/__init__.py +0 -0
- /agenta/client/backend/{resources/observability → observability}/__init__.py +0 -0
- /agenta/client/backend/{resources/testsets → testsets}/__init__.py +0 -0
- /agenta/client/backend/{resources/variants → variants}/__init__.py +0 -0
- /agenta/client/backend/{resources/variants → variants}/types/__init__.py +0 -0
- {agenta-0.24.1.dist-info → agenta-0.24.2.dist-info}/WHEEL +0 -0
- {agenta-0.24.1.dist-info → agenta-0.24.2.dist-info}/entry_points.txt +0 -0
|
@@ -8,6 +8,7 @@ from .app_variant_revision import AppVariantRevision
|
|
|
8
8
|
from .base_output import BaseOutput
|
|
9
9
|
from .body_import_testset import BodyImportTestset
|
|
10
10
|
from .config_db import ConfigDb
|
|
11
|
+
from .correct_answer import CorrectAnswer
|
|
11
12
|
from .create_app_output import CreateAppOutput
|
|
12
13
|
from .create_span import CreateSpan
|
|
13
14
|
from .create_trace_response import CreateTraceResponse
|
|
@@ -24,10 +25,8 @@ from .evaluation_scenario_result import EvaluationScenarioResult
|
|
|
24
25
|
from .evaluation_scenario_score_update import EvaluationScenarioScoreUpdate
|
|
25
26
|
from .evaluation_status_enum import EvaluationStatusEnum
|
|
26
27
|
from .evaluation_type import EvaluationType
|
|
27
|
-
from .evaluation_webhook import EvaluationWebhook
|
|
28
28
|
from .evaluator import Evaluator
|
|
29
29
|
from .evaluator_config import EvaluatorConfig
|
|
30
|
-
from .feedback import Feedback
|
|
31
30
|
from .get_config_response import GetConfigResponse
|
|
32
31
|
from .http_validation_error import HttpValidationError
|
|
33
32
|
from .human_evaluation import HumanEvaluation
|
|
@@ -41,17 +40,18 @@ from .invite_request import InviteRequest
|
|
|
41
40
|
from .list_api_keys_response import ListApiKeysResponse
|
|
42
41
|
from .llm_run_rate_limit import LlmRunRateLimit
|
|
43
42
|
from .llm_tokens import LlmTokens
|
|
43
|
+
from .lm_providers_enum import LmProvidersEnum
|
|
44
44
|
from .new_human_evaluation import NewHumanEvaluation
|
|
45
45
|
from .new_testset import NewTestset
|
|
46
46
|
from .organization import Organization
|
|
47
47
|
from .organization_output import OrganizationOutput
|
|
48
|
+
from .outputs import Outputs
|
|
48
49
|
from .permission import Permission
|
|
49
50
|
from .result import Result
|
|
50
51
|
from .score import Score
|
|
51
52
|
from .simple_evaluation_output import SimpleEvaluationOutput
|
|
52
53
|
from .span import Span
|
|
53
54
|
from .span_detail import SpanDetail
|
|
54
|
-
from .span_kind import SpanKind
|
|
55
55
|
from .span_status_code import SpanStatusCode
|
|
56
56
|
from .span_variant import SpanVariant
|
|
57
57
|
from .template import Template
|
|
@@ -59,6 +59,7 @@ from .template_image_info import TemplateImageInfo
|
|
|
59
59
|
from .test_set_output_response import TestSetOutputResponse
|
|
60
60
|
from .test_set_simple_response import TestSetSimpleResponse
|
|
61
61
|
from .trace_detail import TraceDetail
|
|
62
|
+
from .update_app_output import UpdateAppOutput
|
|
62
63
|
from .uri import Uri
|
|
63
64
|
from .validation_error import ValidationError
|
|
64
65
|
from .validation_error_loc_item import ValidationErrorLocItem
|
|
@@ -80,6 +81,7 @@ __all__ = [
|
|
|
80
81
|
"BaseOutput",
|
|
81
82
|
"BodyImportTestset",
|
|
82
83
|
"ConfigDb",
|
|
84
|
+
"CorrectAnswer",
|
|
83
85
|
"CreateAppOutput",
|
|
84
86
|
"CreateSpan",
|
|
85
87
|
"CreateTraceResponse",
|
|
@@ -96,10 +98,8 @@ __all__ = [
|
|
|
96
98
|
"EvaluationScenarioScoreUpdate",
|
|
97
99
|
"EvaluationStatusEnum",
|
|
98
100
|
"EvaluationType",
|
|
99
|
-
"EvaluationWebhook",
|
|
100
101
|
"Evaluator",
|
|
101
102
|
"EvaluatorConfig",
|
|
102
|
-
"Feedback",
|
|
103
103
|
"GetConfigResponse",
|
|
104
104
|
"HttpValidationError",
|
|
105
105
|
"HumanEvaluation",
|
|
@@ -113,17 +113,18 @@ __all__ = [
|
|
|
113
113
|
"ListApiKeysResponse",
|
|
114
114
|
"LlmRunRateLimit",
|
|
115
115
|
"LlmTokens",
|
|
116
|
+
"LmProvidersEnum",
|
|
116
117
|
"NewHumanEvaluation",
|
|
117
118
|
"NewTestset",
|
|
118
119
|
"Organization",
|
|
119
120
|
"OrganizationOutput",
|
|
121
|
+
"Outputs",
|
|
120
122
|
"Permission",
|
|
121
123
|
"Result",
|
|
122
124
|
"Score",
|
|
123
125
|
"SimpleEvaluationOutput",
|
|
124
126
|
"Span",
|
|
125
127
|
"SpanDetail",
|
|
126
|
-
"SpanKind",
|
|
127
128
|
"SpanStatusCode",
|
|
128
129
|
"SpanVariant",
|
|
129
130
|
"Template",
|
|
@@ -131,6 +132,7 @@ __all__ = [
|
|
|
131
132
|
"TestSetOutputResponse",
|
|
132
133
|
"TestSetSimpleResponse",
|
|
133
134
|
"TraceDetail",
|
|
135
|
+
"UpdateAppOutput",
|
|
134
136
|
"Uri",
|
|
135
137
|
"ValidationError",
|
|
136
138
|
"ValidationErrorLocItem",
|
|
@@ -1,39 +1,24 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import typing
|
|
5
|
-
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
7
4
|
from .aggregated_result_evaluator_config import AggregatedResultEvaluatorConfig
|
|
8
5
|
from .result import Result
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
except ImportError:
|
|
13
|
-
import pydantic # type: ignore
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
8
|
+
import pydantic
|
|
14
9
|
|
|
15
10
|
|
|
16
|
-
class AggregatedResult(
|
|
11
|
+
class AggregatedResult(UniversalBaseModel):
|
|
17
12
|
evaluator_config: AggregatedResultEvaluatorConfig
|
|
18
13
|
result: Result
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
return super().json(**kwargs_with_defaults)
|
|
27
|
-
|
|
28
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
29
|
-
kwargs_with_defaults: typing.Any = {
|
|
30
|
-
"by_alias": True,
|
|
31
|
-
"exclude_unset": True,
|
|
32
|
-
**kwargs,
|
|
33
|
-
}
|
|
34
|
-
return super().dict(**kwargs_with_defaults)
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
17
|
+
extra="allow", frozen=True
|
|
18
|
+
) # type: ignore # Pydantic v2
|
|
19
|
+
else:
|
|
35
20
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
class Config:
|
|
22
|
+
frozen = True
|
|
23
|
+
smart_union = True
|
|
24
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
|
-
|
|
5
4
|
from .evaluator_config import EvaluatorConfig
|
|
6
5
|
|
|
7
6
|
AggregatedResultEvaluatorConfig = typing.Union[
|
|
8
|
-
EvaluatorConfig, typing.Dict[str, typing.Any]
|
|
7
|
+
EvaluatorConfig, typing.Dict[str, typing.Optional[typing.Any]]
|
|
9
8
|
]
|
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
4
5
|
import typing
|
|
6
|
+
import pydantic
|
|
5
7
|
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
10
|
-
except ImportError:
|
|
11
|
-
import pydantic # type: ignore
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class App(pydantic.BaseModel):
|
|
9
|
+
class App(UniversalBaseModel):
|
|
15
10
|
app_id: str
|
|
16
11
|
app_name: str
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
return super().json(**kwargs_with_defaults)
|
|
25
|
-
|
|
26
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
27
|
-
kwargs_with_defaults: typing.Any = {
|
|
28
|
-
"by_alias": True,
|
|
29
|
-
"exclude_unset": True,
|
|
30
|
-
**kwargs,
|
|
31
|
-
}
|
|
32
|
-
return super().dict(**kwargs_with_defaults)
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
15
|
+
extra="allow", frozen=True
|
|
16
|
+
) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
33
18
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,52 +1,36 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
4
|
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
5
7
|
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
10
|
-
except ImportError:
|
|
11
|
-
import pydantic # type: ignore
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class AppVariantResponse(pydantic.BaseModel):
|
|
9
|
+
class AppVariantResponse(UniversalBaseModel):
|
|
15
10
|
app_id: str
|
|
16
11
|
app_name: str
|
|
17
12
|
variant_id: str
|
|
18
13
|
variant_name: str
|
|
19
|
-
parameters: typing.Optional[typing.Dict[str, typing.Any]]
|
|
20
|
-
previous_variant_name: typing.Optional[str]
|
|
14
|
+
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
21
15
|
user_id: str
|
|
22
16
|
base_name: str
|
|
23
17
|
base_id: str
|
|
24
18
|
config_name: str
|
|
25
|
-
uri: typing.Optional[str]
|
|
19
|
+
uri: typing.Optional[str] = None
|
|
26
20
|
revision: int
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
created_at: typing.Optional[dt.datetime] = None
|
|
30
|
-
updated_at: typing.Optional[dt.datetime] = None
|
|
21
|
+
created_at: typing.Optional[str] = None
|
|
22
|
+
updated_at: typing.Optional[str] = None
|
|
31
23
|
modified_by_id: typing.Optional[str] = None
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
**kwargs,
|
|
46
|
-
}
|
|
47
|
-
return super().dict(**kwargs_with_defaults)
|
|
48
|
-
|
|
49
|
-
class Config:
|
|
50
|
-
frozen = True
|
|
51
|
-
smart_union = True
|
|
52
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
24
|
+
organization_id: typing.Optional[str] = None
|
|
25
|
+
workspace_id: typing.Optional[str] = None
|
|
26
|
+
|
|
27
|
+
if IS_PYDANTIC_V2:
|
|
28
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
29
|
+
extra="allow", frozen=True
|
|
30
|
+
) # type: ignore # Pydantic v2
|
|
31
|
+
else:
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import typing
|
|
5
|
-
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
7
4
|
from .config_db import ConfigDb
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
except ImportError:
|
|
12
|
-
import pydantic # type: ignore
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
|
+
import pydantic
|
|
13
8
|
|
|
14
9
|
|
|
15
|
-
class AppVariantRevision(
|
|
10
|
+
class AppVariantRevision(UniversalBaseModel):
|
|
16
11
|
revision: int
|
|
17
12
|
modified_by: str
|
|
18
13
|
config: ConfigDb
|
|
19
|
-
created_at:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"by_alias": True,
|
|
32
|
-
"exclude_unset": True,
|
|
33
|
-
**kwargs,
|
|
34
|
-
}
|
|
35
|
-
return super().dict(**kwargs_with_defaults)
|
|
36
|
-
|
|
37
|
-
class Config:
|
|
38
|
-
frozen = True
|
|
39
|
-
smart_union = True
|
|
40
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
14
|
+
created_at: str
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
18
|
+
extra="allow", frozen=True
|
|
19
|
+
) # type: ignore # Pydantic v2
|
|
20
|
+
else:
|
|
21
|
+
|
|
22
|
+
class Config:
|
|
23
|
+
frozen = True
|
|
24
|
+
smart_union = True
|
|
25
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
4
5
|
import typing
|
|
6
|
+
import pydantic
|
|
5
7
|
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
10
|
-
except ImportError:
|
|
11
|
-
import pydantic # type: ignore
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class BaseOutput(pydantic.BaseModel):
|
|
9
|
+
class BaseOutput(UniversalBaseModel):
|
|
15
10
|
base_id: str
|
|
16
11
|
base_name: str
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
return super().json(**kwargs_with_defaults)
|
|
25
|
-
|
|
26
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
27
|
-
kwargs_with_defaults: typing.Any = {
|
|
28
|
-
"by_alias": True,
|
|
29
|
-
"exclude_unset": True,
|
|
30
|
-
**kwargs,
|
|
31
|
-
}
|
|
32
|
-
return super().dict(**kwargs_with_defaults)
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
15
|
+
extra="allow", frozen=True
|
|
16
|
+
) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
33
18
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,38 +1,23 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
4
|
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
5
7
|
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
class BodyImportTestset(UniversalBaseModel):
|
|
10
|
+
endpoint: typing.Optional[str] = None
|
|
11
|
+
testset_name: typing.Optional[str] = None
|
|
12
|
+
app_id: typing.Optional[str] = None
|
|
12
13
|
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
16
|
+
extra="allow", frozen=True
|
|
17
|
+
) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
13
19
|
|
|
14
|
-
class
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def json(self, **kwargs: typing.Any) -> str:
|
|
20
|
-
kwargs_with_defaults: typing.Any = {
|
|
21
|
-
"by_alias": True,
|
|
22
|
-
"exclude_unset": True,
|
|
23
|
-
**kwargs,
|
|
24
|
-
}
|
|
25
|
-
return super().json(**kwargs_with_defaults)
|
|
26
|
-
|
|
27
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
28
|
-
kwargs_with_defaults: typing.Any = {
|
|
29
|
-
"by_alias": True,
|
|
30
|
-
"exclude_unset": True,
|
|
31
|
-
**kwargs,
|
|
32
|
-
}
|
|
33
|
-
return super().dict(**kwargs_with_defaults)
|
|
34
|
-
|
|
35
|
-
class Config:
|
|
36
|
-
frozen = True
|
|
37
|
-
smart_union = True
|
|
38
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
4
|
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
5
7
|
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
10
|
-
except ImportError:
|
|
11
|
-
import pydantic # type: ignore
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class ConfigDb(pydantic.BaseModel):
|
|
9
|
+
class ConfigDb(UniversalBaseModel):
|
|
15
10
|
config_name: str
|
|
16
|
-
parameters: typing.Optional[typing.Dict[str, typing.Any]]
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"by_alias": True,
|
|
29
|
-
"exclude_unset": True,
|
|
30
|
-
**kwargs,
|
|
31
|
-
}
|
|
32
|
-
return super().dict(**kwargs_with_defaults)
|
|
33
|
-
|
|
34
|
-
class Config:
|
|
35
|
-
frozen = True
|
|
36
|
-
smart_union = True
|
|
37
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
|
11
|
+
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
15
|
+
extra="allow", frozen=True
|
|
16
|
+
) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
import typing
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CorrectAnswer(UniversalBaseModel):
|
|
10
|
+
key: str
|
|
11
|
+
value: str
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
15
|
+
extra="allow", frozen=True
|
|
16
|
+
) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,37 +1,22 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
4
5
|
import typing
|
|
6
|
+
import pydantic
|
|
5
7
|
|
|
6
|
-
from ..core.datetime_utils import serialize_datetime
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
import pydantic.v1 as pydantic # type: ignore
|
|
10
|
-
except ImportError:
|
|
11
|
-
import pydantic # type: ignore
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class CreateAppOutput(pydantic.BaseModel):
|
|
9
|
+
class CreateAppOutput(UniversalBaseModel):
|
|
15
10
|
app_id: str
|
|
16
11
|
app_name: str
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
return super().json(**kwargs_with_defaults)
|
|
25
|
-
|
|
26
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
27
|
-
kwargs_with_defaults: typing.Any = {
|
|
28
|
-
"by_alias": True,
|
|
29
|
-
"exclude_unset": True,
|
|
30
|
-
**kwargs,
|
|
31
|
-
}
|
|
32
|
-
return super().dict(**kwargs_with_defaults)
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
15
|
+
extra="allow", frozen=True
|
|
16
|
+
) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
33
18
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|