agenta 0.12.7__py3-none-any.whl → 0.13.0a0__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/__init__.py +3 -2
- agenta/cli/helper.py +1 -1
- agenta/cli/main.py +1 -1
- agenta/cli/variant_commands.py +7 -5
- agenta/client/api.py +1 -1
- agenta/client/backend/__init__.py +78 -18
- agenta/client/backend/client.py +961 -5575
- agenta/client/backend/core/api_error.py +1 -3
- agenta/client/backend/core/datetime_utils.py +1 -3
- agenta/client/backend/core/jsonable_encoder.py +3 -9
- agenta/client/backend/resources/__init__.py +20 -0
- agenta/client/backend/resources/apps/__init__.py +2 -0
- agenta/client/backend/resources/apps/client.py +915 -0
- agenta/client/backend/resources/bases/__init__.py +2 -0
- agenta/client/backend/resources/bases/client.py +121 -0
- agenta/client/backend/resources/configs/__init__.py +2 -0
- agenta/client/backend/resources/configs/client.py +333 -0
- agenta/client/backend/resources/containers/__init__.py +5 -0
- agenta/client/backend/resources/containers/client.py +351 -0
- agenta/client/backend/resources/containers/types/__init__.py +5 -0
- agenta/client/backend/{types → resources/containers/types}/container_templates_response.py +1 -1
- agenta/client/backend/resources/environments/__init__.py +2 -0
- agenta/client/backend/resources/environments/client.py +119 -0
- agenta/client/backend/resources/evaluations/__init__.py +2 -0
- agenta/client/backend/resources/evaluations/client.py +948 -0
- agenta/client/backend/resources/evaluators/__init__.py +2 -0
- agenta/client/backend/resources/evaluators/client.py +554 -0
- agenta/client/backend/resources/observability/__init__.py +2 -0
- agenta/client/backend/resources/observability/client.py +1114 -0
- agenta/client/backend/resources/testsets/__init__.py +2 -0
- agenta/client/backend/resources/testsets/client.py +649 -0
- agenta/client/backend/resources/variants/__init__.py +5 -0
- agenta/client/backend/resources/variants/client.py +730 -0
- agenta/client/backend/resources/variants/types/__init__.py +5 -0
- agenta/client/backend/resources/variants/types/add_variant_from_base_and_config_response.py +7 -0
- agenta/client/backend/types/__init__.py +54 -22
- agenta/client/backend/types/aggregated_result.py +4 -12
- agenta/client/backend/types/aggregated_result_evaluator_config.py +7 -0
- agenta/client/backend/types/app.py +2 -10
- agenta/client/backend/types/{app_variant_output.py → app_variant_response.py} +6 -12
- agenta/client/backend/types/app_variant_revision.py +2 -10
- agenta/client/backend/types/base_output.py +2 -10
- agenta/client/backend/types/body_import_testset.py +2 -10
- agenta/client/backend/types/config_db.py +2 -10
- agenta/client/backend/types/create_app_output.py +2 -10
- agenta/client/backend/types/{trace.py → create_span.py} +21 -20
- agenta/client/backend/types/{delete_evaluation.py → create_trace_response.py} +5 -12
- agenta/client/backend/types/docker_env_vars.py +2 -10
- agenta/client/backend/types/environment_output.py +5 -11
- agenta/client/backend/types/environment_output_extended.py +37 -0
- agenta/client/backend/types/environment_revision.py +33 -0
- agenta/client/backend/types/error.py +29 -0
- agenta/client/backend/types/evaluation.py +8 -13
- agenta/client/backend/types/evaluation_scenario.py +2 -10
- agenta/client/backend/types/evaluation_scenario_input.py +2 -10
- agenta/client/backend/types/evaluation_scenario_output.py +6 -12
- agenta/client/backend/types/evaluation_scenario_result.py +2 -10
- agenta/client/backend/types/evaluation_scenario_score_update.py +28 -0
- agenta/client/backend/types/evaluation_status_enum.py +4 -0
- agenta/client/backend/types/evaluation_type.py +1 -3
- agenta/client/backend/types/evaluation_webhook.py +2 -10
- agenta/client/backend/types/evaluator.py +3 -10
- agenta/client/backend/types/evaluator_config.py +2 -10
- agenta/client/backend/types/feedback.py +2 -10
- agenta/client/backend/types/{get_config_reponse.py → get_config_response.py} +4 -12
- agenta/client/backend/types/http_validation_error.py +2 -10
- agenta/client/backend/types/human_evaluation.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario.py +4 -12
- agenta/client/backend/types/human_evaluation_scenario_input.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario_output.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario_update.py +37 -0
- agenta/client/backend/types/human_evaluation_update.py +29 -0
- agenta/client/backend/types/image.py +3 -10
- agenta/client/backend/types/invite_request.py +3 -10
- agenta/client/backend/types/{list_api_keys_output.py → list_api_keys_response.py} +3 -11
- agenta/client/backend/types/llm_run_rate_limit.py +2 -10
- agenta/client/backend/types/llm_tokens.py +30 -0
- agenta/client/backend/types/new_human_evaluation.py +34 -0
- agenta/client/backend/types/new_testset.py +2 -10
- agenta/client/backend/types/organization.py +3 -10
- agenta/client/backend/types/organization_output.py +2 -10
- agenta/client/backend/types/permission.py +141 -0
- agenta/client/backend/types/result.py +4 -10
- agenta/client/backend/types/{human_evaluation_scenario_score.py → score.py} +1 -1
- agenta/client/backend/types/simple_evaluation_output.py +2 -10
- agenta/client/backend/types/span.py +20 -26
- agenta/client/backend/types/span_detail.py +44 -0
- agenta/client/backend/types/span_kind.py +49 -0
- agenta/client/backend/types/span_status_code.py +29 -0
- agenta/client/backend/types/span_variant.py +30 -0
- agenta/client/backend/types/template.py +2 -10
- agenta/client/backend/types/template_image_info.py +2 -10
- agenta/client/backend/types/test_set_output_response.py +2 -10
- agenta/client/backend/types/test_set_simple_response.py +2 -10
- agenta/client/backend/types/trace_detail.py +44 -0
- agenta/client/backend/types/uri.py +2 -10
- agenta/client/backend/types/validation_error.py +2 -10
- agenta/client/backend/types/variant_action.py +2 -10
- agenta/client/backend/types/variant_action_enum.py +1 -3
- agenta/client/backend/types/with_pagination.py +32 -0
- agenta/client/backend/types/workspace_member_response.py +30 -0
- agenta/client/backend/types/workspace_permission.py +32 -0
- agenta/client/backend/types/workspace_response.py +36 -0
- agenta/client/backend/types/workspace_role.py +41 -0
- agenta/client/backend/types/workspace_role_response.py +30 -0
- agenta/docker/docker_utils.py +1 -5
- agenta/sdk/__init__.py +3 -2
- agenta/sdk/agenta_decorator.py +68 -26
- agenta/sdk/agenta_init.py +50 -20
- agenta/sdk/tracing/context_manager.py +13 -0
- agenta/sdk/tracing/decorators.py +41 -0
- agenta/sdk/tracing/llm_tracing.py +203 -0
- agenta/sdk/tracing/logger.py +19 -0
- agenta/sdk/tracing/tasks_manager.py +130 -0
- agenta/sdk/types.py +0 -38
- {agenta-0.12.7.dist-info → agenta-0.13.0a0.dist-info}/METADATA +2 -1
- agenta-0.13.0a0.dist-info/RECORD +161 -0
- agenta/client/backend/types/add_variant_from_base_and_config_response.py +0 -7
- agenta/client/backend/types/app_variant_output_extended.py +0 -50
- agenta/client/backend/types/human_evaluation_scenario_update_score.py +0 -5
- agenta-0.12.7.dist-info/RECORD +0 -114
- {agenta-0.12.7.dist-info → agenta-0.13.0a0.dist-info}/WHEEL +0 -0
- {agenta-0.12.7.dist-info → agenta-0.13.0a0.dist-info}/entry_points.txt +0 -0
|
@@ -1,113 +1,145 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from .add_variant_from_base_and_config_response import (
|
|
4
|
-
AddVariantFromBaseAndConfigResponse,
|
|
5
|
-
)
|
|
6
3
|
from .aggregated_result import AggregatedResult
|
|
4
|
+
from .aggregated_result_evaluator_config import AggregatedResultEvaluatorConfig
|
|
7
5
|
from .app import App
|
|
8
|
-
from .
|
|
9
|
-
from .app_variant_output_extended import AppVariantOutputExtended
|
|
6
|
+
from .app_variant_response import AppVariantResponse
|
|
10
7
|
from .app_variant_revision import AppVariantRevision
|
|
11
8
|
from .base_output import BaseOutput
|
|
12
9
|
from .body_import_testset import BodyImportTestset
|
|
13
10
|
from .config_db import ConfigDb
|
|
14
|
-
from .container_templates_response import ContainerTemplatesResponse
|
|
15
11
|
from .create_app_output import CreateAppOutput
|
|
16
|
-
from .
|
|
12
|
+
from .create_span import CreateSpan
|
|
13
|
+
from .create_trace_response import CreateTraceResponse
|
|
17
14
|
from .docker_env_vars import DockerEnvVars
|
|
18
15
|
from .environment_output import EnvironmentOutput
|
|
16
|
+
from .environment_output_extended import EnvironmentOutputExtended
|
|
17
|
+
from .environment_revision import EnvironmentRevision
|
|
18
|
+
from .error import Error
|
|
19
19
|
from .evaluation import Evaluation
|
|
20
20
|
from .evaluation_scenario import EvaluationScenario
|
|
21
21
|
from .evaluation_scenario_input import EvaluationScenarioInput
|
|
22
22
|
from .evaluation_scenario_output import EvaluationScenarioOutput
|
|
23
23
|
from .evaluation_scenario_result import EvaluationScenarioResult
|
|
24
|
+
from .evaluation_scenario_score_update import EvaluationScenarioScoreUpdate
|
|
24
25
|
from .evaluation_status_enum import EvaluationStatusEnum
|
|
25
26
|
from .evaluation_type import EvaluationType
|
|
26
27
|
from .evaluation_webhook import EvaluationWebhook
|
|
27
28
|
from .evaluator import Evaluator
|
|
28
29
|
from .evaluator_config import EvaluatorConfig
|
|
29
30
|
from .feedback import Feedback
|
|
30
|
-
from .
|
|
31
|
+
from .get_config_response import GetConfigResponse
|
|
31
32
|
from .http_validation_error import HttpValidationError
|
|
32
33
|
from .human_evaluation import HumanEvaluation
|
|
33
34
|
from .human_evaluation_scenario import HumanEvaluationScenario
|
|
34
35
|
from .human_evaluation_scenario_input import HumanEvaluationScenarioInput
|
|
35
36
|
from .human_evaluation_scenario_output import HumanEvaluationScenarioOutput
|
|
36
|
-
from .
|
|
37
|
-
from .
|
|
37
|
+
from .human_evaluation_scenario_update import HumanEvaluationScenarioUpdate
|
|
38
|
+
from .human_evaluation_update import HumanEvaluationUpdate
|
|
38
39
|
from .image import Image
|
|
39
40
|
from .invite_request import InviteRequest
|
|
40
|
-
from .
|
|
41
|
+
from .list_api_keys_response import ListApiKeysResponse
|
|
41
42
|
from .llm_run_rate_limit import LlmRunRateLimit
|
|
43
|
+
from .llm_tokens import LlmTokens
|
|
44
|
+
from .new_human_evaluation import NewHumanEvaluation
|
|
42
45
|
from .new_testset import NewTestset
|
|
43
46
|
from .organization import Organization
|
|
44
47
|
from .organization_output import OrganizationOutput
|
|
48
|
+
from .permission import Permission
|
|
45
49
|
from .result import Result
|
|
50
|
+
from .score import Score
|
|
46
51
|
from .simple_evaluation_output import SimpleEvaluationOutput
|
|
47
52
|
from .span import Span
|
|
53
|
+
from .span_detail import SpanDetail
|
|
54
|
+
from .span_kind import SpanKind
|
|
55
|
+
from .span_status_code import SpanStatusCode
|
|
56
|
+
from .span_variant import SpanVariant
|
|
48
57
|
from .template import Template
|
|
49
58
|
from .template_image_info import TemplateImageInfo
|
|
50
59
|
from .test_set_output_response import TestSetOutputResponse
|
|
51
60
|
from .test_set_simple_response import TestSetSimpleResponse
|
|
52
|
-
from .
|
|
61
|
+
from .trace_detail import TraceDetail
|
|
53
62
|
from .uri import Uri
|
|
54
63
|
from .validation_error import ValidationError
|
|
55
64
|
from .validation_error_loc_item import ValidationErrorLocItem
|
|
56
65
|
from .variant_action import VariantAction
|
|
57
66
|
from .variant_action_enum import VariantActionEnum
|
|
67
|
+
from .with_pagination import WithPagination
|
|
68
|
+
from .workspace_member_response import WorkspaceMemberResponse
|
|
69
|
+
from .workspace_permission import WorkspacePermission
|
|
70
|
+
from .workspace_response import WorkspaceResponse
|
|
71
|
+
from .workspace_role import WorkspaceRole
|
|
72
|
+
from .workspace_role_response import WorkspaceRoleResponse
|
|
58
73
|
|
|
59
74
|
__all__ = [
|
|
60
|
-
"AddVariantFromBaseAndConfigResponse",
|
|
61
75
|
"AggregatedResult",
|
|
76
|
+
"AggregatedResultEvaluatorConfig",
|
|
62
77
|
"App",
|
|
63
|
-
"
|
|
64
|
-
"AppVariantOutputExtended",
|
|
78
|
+
"AppVariantResponse",
|
|
65
79
|
"AppVariantRevision",
|
|
66
80
|
"BaseOutput",
|
|
67
81
|
"BodyImportTestset",
|
|
68
82
|
"ConfigDb",
|
|
69
|
-
"ContainerTemplatesResponse",
|
|
70
83
|
"CreateAppOutput",
|
|
71
|
-
"
|
|
84
|
+
"CreateSpan",
|
|
85
|
+
"CreateTraceResponse",
|
|
72
86
|
"DockerEnvVars",
|
|
73
87
|
"EnvironmentOutput",
|
|
88
|
+
"EnvironmentOutputExtended",
|
|
89
|
+
"EnvironmentRevision",
|
|
90
|
+
"Error",
|
|
74
91
|
"Evaluation",
|
|
75
92
|
"EvaluationScenario",
|
|
76
93
|
"EvaluationScenarioInput",
|
|
77
94
|
"EvaluationScenarioOutput",
|
|
78
95
|
"EvaluationScenarioResult",
|
|
96
|
+
"EvaluationScenarioScoreUpdate",
|
|
79
97
|
"EvaluationStatusEnum",
|
|
80
98
|
"EvaluationType",
|
|
81
99
|
"EvaluationWebhook",
|
|
82
100
|
"Evaluator",
|
|
83
101
|
"EvaluatorConfig",
|
|
84
102
|
"Feedback",
|
|
85
|
-
"
|
|
103
|
+
"GetConfigResponse",
|
|
86
104
|
"HttpValidationError",
|
|
87
105
|
"HumanEvaluation",
|
|
88
106
|
"HumanEvaluationScenario",
|
|
89
107
|
"HumanEvaluationScenarioInput",
|
|
90
108
|
"HumanEvaluationScenarioOutput",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
109
|
+
"HumanEvaluationScenarioUpdate",
|
|
110
|
+
"HumanEvaluationUpdate",
|
|
93
111
|
"Image",
|
|
94
112
|
"InviteRequest",
|
|
95
|
-
"
|
|
113
|
+
"ListApiKeysResponse",
|
|
96
114
|
"LlmRunRateLimit",
|
|
115
|
+
"LlmTokens",
|
|
116
|
+
"NewHumanEvaluation",
|
|
97
117
|
"NewTestset",
|
|
98
118
|
"Organization",
|
|
99
119
|
"OrganizationOutput",
|
|
120
|
+
"Permission",
|
|
100
121
|
"Result",
|
|
122
|
+
"Score",
|
|
101
123
|
"SimpleEvaluationOutput",
|
|
102
124
|
"Span",
|
|
125
|
+
"SpanDetail",
|
|
126
|
+
"SpanKind",
|
|
127
|
+
"SpanStatusCode",
|
|
128
|
+
"SpanVariant",
|
|
103
129
|
"Template",
|
|
104
130
|
"TemplateImageInfo",
|
|
105
131
|
"TestSetOutputResponse",
|
|
106
132
|
"TestSetSimpleResponse",
|
|
107
|
-
"
|
|
133
|
+
"TraceDetail",
|
|
108
134
|
"Uri",
|
|
109
135
|
"ValidationError",
|
|
110
136
|
"ValidationErrorLocItem",
|
|
111
137
|
"VariantAction",
|
|
112
138
|
"VariantActionEnum",
|
|
139
|
+
"WithPagination",
|
|
140
|
+
"WorkspaceMemberResponse",
|
|
141
|
+
"WorkspacePermission",
|
|
142
|
+
"WorkspaceResponse",
|
|
143
|
+
"WorkspaceRole",
|
|
144
|
+
"WorkspaceRoleResponse",
|
|
113
145
|
]
|
|
@@ -4,7 +4,7 @@ import datetime as dt
|
|
|
4
4
|
import typing
|
|
5
5
|
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from .
|
|
7
|
+
from .aggregated_result_evaluator_config import AggregatedResultEvaluatorConfig
|
|
8
8
|
from .result import Result
|
|
9
9
|
|
|
10
10
|
try:
|
|
@@ -14,23 +14,15 @@ except ImportError:
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class AggregatedResult(pydantic.BaseModel):
|
|
17
|
-
evaluator_config:
|
|
17
|
+
evaluator_config: AggregatedResultEvaluatorConfig
|
|
18
18
|
result: Result
|
|
19
19
|
|
|
20
20
|
def json(self, **kwargs: typing.Any) -> str:
|
|
21
|
-
kwargs_with_defaults: typing.Any = {
|
|
22
|
-
"by_alias": True,
|
|
23
|
-
"exclude_unset": True,
|
|
24
|
-
**kwargs,
|
|
25
|
-
}
|
|
21
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
26
22
|
return super().json(**kwargs_with_defaults)
|
|
27
23
|
|
|
28
24
|
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
|
-
}
|
|
25
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
34
26
|
return super().dict(**kwargs_with_defaults)
|
|
35
27
|
|
|
36
28
|
class Config:
|
|
@@ -16,19 +16,11 @@ class App(pydantic.BaseModel):
|
|
|
16
16
|
app_name: str
|
|
17
17
|
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
|
19
|
-
kwargs_with_defaults: typing.Any = {
|
|
20
|
-
"by_alias": True,
|
|
21
|
-
"exclude_unset": True,
|
|
22
|
-
**kwargs,
|
|
23
|
-
}
|
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
20
|
return super().json(**kwargs_with_defaults)
|
|
25
21
|
|
|
26
22
|
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
|
-
}
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
32
24
|
return super().dict(**kwargs_with_defaults)
|
|
33
25
|
|
|
34
26
|
class Config:
|
|
@@ -11,34 +11,28 @@ except ImportError:
|
|
|
11
11
|
import pydantic # type: ignore
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class AppVariantResponse(pydantic.BaseModel):
|
|
15
15
|
app_id: str
|
|
16
16
|
app_name: str
|
|
17
17
|
variant_id: str
|
|
18
18
|
variant_name: str
|
|
19
19
|
parameters: typing.Optional[typing.Dict[str, typing.Any]]
|
|
20
20
|
previous_variant_name: typing.Optional[str]
|
|
21
|
-
organization_id: typing.Optional[str]
|
|
22
21
|
user_id: str
|
|
23
22
|
base_name: str
|
|
24
23
|
base_id: str
|
|
25
24
|
config_name: str
|
|
26
25
|
uri: typing.Optional[str]
|
|
26
|
+
revision: int
|
|
27
|
+
organization_id: typing.Optional[str]
|
|
28
|
+
workspace_id: typing.Optional[str]
|
|
27
29
|
|
|
28
30
|
def json(self, **kwargs: typing.Any) -> str:
|
|
29
|
-
kwargs_with_defaults: typing.Any = {
|
|
30
|
-
"by_alias": True,
|
|
31
|
-
"exclude_unset": True,
|
|
32
|
-
**kwargs,
|
|
33
|
-
}
|
|
31
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
34
32
|
return super().json(**kwargs_with_defaults)
|
|
35
33
|
|
|
36
34
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
37
|
-
kwargs_with_defaults: typing.Any = {
|
|
38
|
-
"by_alias": True,
|
|
39
|
-
"exclude_unset": True,
|
|
40
|
-
**kwargs,
|
|
41
|
-
}
|
|
35
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
42
36
|
return super().dict(**kwargs_with_defaults)
|
|
43
37
|
|
|
44
38
|
class Config:
|
|
@@ -19,19 +19,11 @@ class AppVariantRevision(pydantic.BaseModel):
|
|
|
19
19
|
created_at: dt.datetime
|
|
20
20
|
|
|
21
21
|
def json(self, **kwargs: typing.Any) -> str:
|
|
22
|
-
kwargs_with_defaults: typing.Any = {
|
|
23
|
-
"by_alias": True,
|
|
24
|
-
"exclude_unset": True,
|
|
25
|
-
**kwargs,
|
|
26
|
-
}
|
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
27
23
|
return super().json(**kwargs_with_defaults)
|
|
28
24
|
|
|
29
25
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
30
|
-
kwargs_with_defaults: typing.Any = {
|
|
31
|
-
"by_alias": True,
|
|
32
|
-
"exclude_unset": True,
|
|
33
|
-
**kwargs,
|
|
34
|
-
}
|
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
35
27
|
return super().dict(**kwargs_with_defaults)
|
|
36
28
|
|
|
37
29
|
class Config:
|
|
@@ -16,19 +16,11 @@ class BaseOutput(pydantic.BaseModel):
|
|
|
16
16
|
base_name: str
|
|
17
17
|
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
|
19
|
-
kwargs_with_defaults: typing.Any = {
|
|
20
|
-
"by_alias": True,
|
|
21
|
-
"exclude_unset": True,
|
|
22
|
-
**kwargs,
|
|
23
|
-
}
|
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
20
|
return super().json(**kwargs_with_defaults)
|
|
25
21
|
|
|
26
22
|
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
|
-
}
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
32
24
|
return super().dict(**kwargs_with_defaults)
|
|
33
25
|
|
|
34
26
|
class Config:
|
|
@@ -17,19 +17,11 @@ class BodyImportTestset(pydantic.BaseModel):
|
|
|
17
17
|
app_id: typing.Optional[str]
|
|
18
18
|
|
|
19
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
|
-
}
|
|
20
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
25
21
|
return super().json(**kwargs_with_defaults)
|
|
26
22
|
|
|
27
23
|
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
|
-
}
|
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
33
25
|
return super().dict(**kwargs_with_defaults)
|
|
34
26
|
|
|
35
27
|
class Config:
|
|
@@ -16,19 +16,11 @@ class ConfigDb(pydantic.BaseModel):
|
|
|
16
16
|
parameters: typing.Optional[typing.Dict[str, typing.Any]]
|
|
17
17
|
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
|
19
|
-
kwargs_with_defaults: typing.Any = {
|
|
20
|
-
"by_alias": True,
|
|
21
|
-
"exclude_unset": True,
|
|
22
|
-
**kwargs,
|
|
23
|
-
}
|
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
20
|
return super().json(**kwargs_with_defaults)
|
|
25
21
|
|
|
26
22
|
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
|
-
}
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
32
24
|
return super().dict(**kwargs_with_defaults)
|
|
33
25
|
|
|
34
26
|
class Config:
|
|
@@ -16,19 +16,11 @@ class CreateAppOutput(pydantic.BaseModel):
|
|
|
16
16
|
app_name: str
|
|
17
17
|
|
|
18
18
|
def json(self, **kwargs: typing.Any) -> str:
|
|
19
|
-
kwargs_with_defaults: typing.Any = {
|
|
20
|
-
"by_alias": True,
|
|
21
|
-
"exclude_unset": True,
|
|
22
|
-
**kwargs,
|
|
23
|
-
}
|
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
20
|
return super().json(**kwargs_with_defaults)
|
|
25
21
|
|
|
26
22
|
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
|
-
}
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
32
24
|
return super().dict(**kwargs_with_defaults)
|
|
33
25
|
|
|
34
26
|
class Config:
|
|
@@ -4,7 +4,9 @@ import datetime as dt
|
|
|
4
4
|
import typing
|
|
5
5
|
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
|
7
|
-
from .
|
|
7
|
+
from .llm_tokens import LlmTokens
|
|
8
|
+
from .span_kind import SpanKind
|
|
9
|
+
from .span_status_code import SpanStatusCode
|
|
8
10
|
|
|
9
11
|
try:
|
|
10
12
|
import pydantic.v1 as pydantic # type: ignore
|
|
@@ -12,34 +14,33 @@ except ImportError:
|
|
|
12
14
|
import pydantic # type: ignore
|
|
13
15
|
|
|
14
16
|
|
|
15
|
-
class
|
|
17
|
+
class CreateSpan(pydantic.BaseModel):
|
|
18
|
+
id: str
|
|
16
19
|
app_id: typing.Optional[str]
|
|
17
20
|
variant_id: typing.Optional[str]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
inputs: typing.Optional[typing.Dict[str, typing.Any]]
|
|
22
|
+
outputs: typing.Optional[typing.List[str]]
|
|
23
|
+
config: typing.Optional[typing.Dict[str, typing.Any]]
|
|
24
|
+
environment: typing.Optional[str]
|
|
22
25
|
tags: typing.Optional[typing.List[str]]
|
|
26
|
+
token_consumption: typing.Optional[int]
|
|
27
|
+
name: str
|
|
28
|
+
parent_span_id: typing.Optional[str]
|
|
29
|
+
attributes: typing.Optional[typing.Dict[str, typing.Any]]
|
|
30
|
+
spankind: str
|
|
31
|
+
status: str
|
|
32
|
+
user: typing.Optional[str]
|
|
23
33
|
start_time: dt.datetime
|
|
24
|
-
end_time: dt.datetime
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
feedbacks: typing.Optional[typing.List[Feedback]]
|
|
34
|
+
end_time: typing.Optional[dt.datetime]
|
|
35
|
+
tokens: typing.Optional[LlmTokens]
|
|
36
|
+
cost: typing.Optional[float]
|
|
28
37
|
|
|
29
38
|
def json(self, **kwargs: typing.Any) -> str:
|
|
30
|
-
kwargs_with_defaults: typing.Any = {
|
|
31
|
-
"by_alias": True,
|
|
32
|
-
"exclude_unset": True,
|
|
33
|
-
**kwargs,
|
|
34
|
-
}
|
|
39
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
35
40
|
return super().json(**kwargs_with_defaults)
|
|
36
41
|
|
|
37
42
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
38
|
-
kwargs_with_defaults: typing.Any = {
|
|
39
|
-
"by_alias": True,
|
|
40
|
-
"exclude_unset": True,
|
|
41
|
-
**kwargs,
|
|
42
|
-
}
|
|
43
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
43
44
|
return super().dict(**kwargs_with_defaults)
|
|
44
45
|
|
|
45
46
|
class Config:
|
|
@@ -11,23 +11,16 @@ except ImportError:
|
|
|
11
11
|
import pydantic # type: ignore
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
15
|
-
|
|
14
|
+
class CreateTraceResponse(pydantic.BaseModel):
|
|
15
|
+
message: str
|
|
16
|
+
data: typing.Dict[str, typing.Any]
|
|
16
17
|
|
|
17
18
|
def json(self, **kwargs: typing.Any) -> str:
|
|
18
|
-
kwargs_with_defaults: typing.Any = {
|
|
19
|
-
"by_alias": True,
|
|
20
|
-
"exclude_unset": True,
|
|
21
|
-
**kwargs,
|
|
22
|
-
}
|
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
23
20
|
return super().json(**kwargs_with_defaults)
|
|
24
21
|
|
|
25
22
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
26
|
-
kwargs_with_defaults: typing.Any = {
|
|
27
|
-
"by_alias": True,
|
|
28
|
-
"exclude_unset": True,
|
|
29
|
-
**kwargs,
|
|
30
|
-
}
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
31
24
|
return super().dict(**kwargs_with_defaults)
|
|
32
25
|
|
|
33
26
|
class Config:
|
|
@@ -15,19 +15,11 @@ class DockerEnvVars(pydantic.BaseModel):
|
|
|
15
15
|
env_vars: typing.Dict[str, str]
|
|
16
16
|
|
|
17
17
|
def json(self, **kwargs: typing.Any) -> str:
|
|
18
|
-
kwargs_with_defaults: typing.Any = {
|
|
19
|
-
"by_alias": True,
|
|
20
|
-
"exclude_unset": True,
|
|
21
|
-
**kwargs,
|
|
22
|
-
}
|
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
23
19
|
return super().json(**kwargs_with_defaults)
|
|
24
20
|
|
|
25
21
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
26
|
-
kwargs_with_defaults: typing.Any = {
|
|
27
|
-
"by_alias": True,
|
|
28
|
-
"exclude_unset": True,
|
|
29
|
-
**kwargs,
|
|
30
|
-
}
|
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
31
23
|
return super().dict(**kwargs_with_defaults)
|
|
32
24
|
|
|
33
25
|
class Config:
|
|
@@ -17,22 +17,16 @@ class EnvironmentOutput(pydantic.BaseModel):
|
|
|
17
17
|
deployed_app_variant_id: typing.Optional[str]
|
|
18
18
|
deployed_variant_name: typing.Optional[str]
|
|
19
19
|
deployed_app_variant_revision_id: typing.Optional[str]
|
|
20
|
-
revision: typing.Optional[
|
|
20
|
+
revision: typing.Optional[int]
|
|
21
|
+
organization_id: typing.Optional[str]
|
|
22
|
+
workspace_id: typing.Optional[str]
|
|
21
23
|
|
|
22
24
|
def json(self, **kwargs: typing.Any) -> str:
|
|
23
|
-
kwargs_with_defaults: typing.Any = {
|
|
24
|
-
"by_alias": True,
|
|
25
|
-
"exclude_unset": True,
|
|
26
|
-
**kwargs,
|
|
27
|
-
}
|
|
25
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
28
26
|
return super().json(**kwargs_with_defaults)
|
|
29
27
|
|
|
30
28
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
31
|
-
kwargs_with_defaults: typing.Any = {
|
|
32
|
-
"by_alias": True,
|
|
33
|
-
"exclude_unset": True,
|
|
34
|
-
**kwargs,
|
|
35
|
-
}
|
|
29
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
36
30
|
return super().dict(**kwargs_with_defaults)
|
|
37
31
|
|
|
38
32
|
class Config:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
|
7
|
+
from .environment_revision import EnvironmentRevision
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
11
|
+
except ImportError:
|
|
12
|
+
import pydantic # type: ignore
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class EnvironmentOutputExtended(pydantic.BaseModel):
|
|
16
|
+
name: str
|
|
17
|
+
app_id: str
|
|
18
|
+
deployed_app_variant_id: typing.Optional[str]
|
|
19
|
+
deployed_variant_name: typing.Optional[str]
|
|
20
|
+
deployed_app_variant_revision_id: typing.Optional[str]
|
|
21
|
+
revision: typing.Optional[int]
|
|
22
|
+
revisions: typing.List[EnvironmentRevision]
|
|
23
|
+
organization_id: typing.Optional[str]
|
|
24
|
+
workspace_id: typing.Optional[str]
|
|
25
|
+
|
|
26
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
28
|
+
return super().json(**kwargs_with_defaults)
|
|
29
|
+
|
|
30
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
31
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
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}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
|
7
|
+
|
|
8
|
+
try:
|
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
10
|
+
except ImportError:
|
|
11
|
+
import pydantic # type: ignore
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class EnvironmentRevision(pydantic.BaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
revision: int
|
|
17
|
+
modified_by: str
|
|
18
|
+
deployed_app_variant_revision: typing.Optional[str]
|
|
19
|
+
deployment: typing.Optional[str]
|
|
20
|
+
created_at: dt.datetime
|
|
21
|
+
|
|
22
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
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 = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
28
|
+
return super().dict(**kwargs_with_defaults)
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
|
7
|
+
|
|
8
|
+
try:
|
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
10
|
+
except ImportError:
|
|
11
|
+
import pydantic # type: ignore
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Error(pydantic.BaseModel):
|
|
15
|
+
message: str
|
|
16
|
+
stacktrace: typing.Optional[str]
|
|
17
|
+
|
|
18
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
19
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
20
|
+
return super().json(**kwargs_with_defaults)
|
|
21
|
+
|
|
22
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
|
+
return super().dict(**kwargs_with_defaults)
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
json_encoders = {dt.datetime: serialize_datetime}
|