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
|
@@ -5,6 +5,7 @@ import typing
|
|
|
5
5
|
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
|
7
7
|
from .aggregated_result import AggregatedResult
|
|
8
|
+
from .result import Result
|
|
8
9
|
|
|
9
10
|
try:
|
|
10
11
|
import pydantic.v1 as pydantic # type: ignore
|
|
@@ -21,27 +22,21 @@ class Evaluation(pydantic.BaseModel):
|
|
|
21
22
|
variant_names: typing.List[str]
|
|
22
23
|
variant_revision_ids: typing.List[str]
|
|
23
24
|
revisions: typing.List[str]
|
|
24
|
-
testset_id: str
|
|
25
|
-
testset_name: str
|
|
26
|
-
status:
|
|
25
|
+
testset_id: typing.Optional[str]
|
|
26
|
+
testset_name: typing.Optional[str]
|
|
27
|
+
status: Result
|
|
27
28
|
aggregated_results: typing.List[AggregatedResult]
|
|
29
|
+
average_cost: typing.Optional[Result]
|
|
30
|
+
average_latency: typing.Optional[Result]
|
|
28
31
|
created_at: dt.datetime
|
|
29
32
|
updated_at: dt.datetime
|
|
30
33
|
|
|
31
34
|
def json(self, **kwargs: typing.Any) -> str:
|
|
32
|
-
kwargs_with_defaults: typing.Any = {
|
|
33
|
-
"by_alias": True,
|
|
34
|
-
"exclude_unset": True,
|
|
35
|
-
**kwargs,
|
|
36
|
-
}
|
|
35
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
37
36
|
return super().json(**kwargs_with_defaults)
|
|
38
37
|
|
|
39
38
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
40
|
-
kwargs_with_defaults: typing.Any = {
|
|
41
|
-
"by_alias": True,
|
|
42
|
-
"exclude_unset": True,
|
|
43
|
-
**kwargs,
|
|
44
|
-
}
|
|
39
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
45
40
|
return super().dict(**kwargs_with_defaults)
|
|
46
41
|
|
|
47
42
|
class Config:
|
|
@@ -26,19 +26,11 @@ class EvaluationScenario(pydantic.BaseModel):
|
|
|
26
26
|
results: typing.List[EvaluationScenarioResult]
|
|
27
27
|
|
|
28
28
|
def json(self, **kwargs: typing.Any) -> str:
|
|
29
|
-
kwargs_with_defaults: typing.Any = {
|
|
30
|
-
"by_alias": True,
|
|
31
|
-
"exclude_unset": True,
|
|
32
|
-
**kwargs,
|
|
33
|
-
}
|
|
29
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
34
30
|
return super().json(**kwargs_with_defaults)
|
|
35
31
|
|
|
36
32
|
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
|
-
}
|
|
33
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
42
34
|
return super().dict(**kwargs_with_defaults)
|
|
43
35
|
|
|
44
36
|
class Config:
|
|
@@ -17,19 +17,11 @@ class EvaluationScenarioInput(pydantic.BaseModel):
|
|
|
17
17
|
value: typing.Optional[typing.Any]
|
|
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:
|
|
@@ -4,6 +4,7 @@ import datetime as dt
|
|
|
4
4
|
import typing
|
|
5
5
|
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
|
7
|
+
from .result import Result
|
|
7
8
|
|
|
8
9
|
try:
|
|
9
10
|
import pydantic.v1 as pydantic # type: ignore
|
|
@@ -12,23 +13,16 @@ except ImportError:
|
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class EvaluationScenarioOutput(pydantic.BaseModel):
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
result: Result
|
|
17
|
+
cost: typing.Optional[float]
|
|
18
|
+
latency: typing.Optional[float]
|
|
17
19
|
|
|
18
20
|
def json(self, **kwargs: typing.Any) -> str:
|
|
19
|
-
kwargs_with_defaults: typing.Any = {
|
|
20
|
-
"by_alias": True,
|
|
21
|
-
"exclude_unset": True,
|
|
22
|
-
**kwargs,
|
|
23
|
-
}
|
|
21
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
24
22
|
return super().json(**kwargs_with_defaults)
|
|
25
23
|
|
|
26
24
|
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
|
-
}
|
|
25
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
32
26
|
return super().dict(**kwargs_with_defaults)
|
|
33
27
|
|
|
34
28
|
class Config:
|
|
@@ -17,19 +17,11 @@ class EvaluationScenarioResult(pydantic.BaseModel):
|
|
|
17
17
|
result: Result
|
|
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:
|
|
@@ -0,0 +1,28 @@
|
|
|
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 EvaluationScenarioScoreUpdate(pydantic.BaseModel):
|
|
15
|
+
score: float
|
|
16
|
+
|
|
17
|
+
def json(self, **kwargs: typing.Any) -> str:
|
|
18
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
19
|
+
return super().json(**kwargs_with_defaults)
|
|
20
|
+
|
|
21
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
23
|
+
return super().dict(**kwargs_with_defaults)
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
|
@@ -14,6 +14,7 @@ class EvaluationStatusEnum(str, enum.Enum):
|
|
|
14
14
|
EVALUATION_INITIALIZED = "EVALUATION_INITIALIZED"
|
|
15
15
|
EVALUATION_STARTED = "EVALUATION_STARTED"
|
|
16
16
|
EVALUATION_FINISHED = "EVALUATION_FINISHED"
|
|
17
|
+
EVALUATION_FINISHED_WITH_ERRORS = "EVALUATION_FINISHED_WITH_ERRORS"
|
|
17
18
|
EVALUATION_FAILED = "EVALUATION_FAILED"
|
|
18
19
|
|
|
19
20
|
def visit(
|
|
@@ -21,6 +22,7 @@ class EvaluationStatusEnum(str, enum.Enum):
|
|
|
21
22
|
evaluation_initialized: typing.Callable[[], T_Result],
|
|
22
23
|
evaluation_started: typing.Callable[[], T_Result],
|
|
23
24
|
evaluation_finished: typing.Callable[[], T_Result],
|
|
25
|
+
evaluation_finished_with_errors: typing.Callable[[], T_Result],
|
|
24
26
|
evaluation_failed: typing.Callable[[], T_Result],
|
|
25
27
|
) -> T_Result:
|
|
26
28
|
if self is EvaluationStatusEnum.EVALUATION_INITIALIZED:
|
|
@@ -29,5 +31,7 @@ class EvaluationStatusEnum(str, enum.Enum):
|
|
|
29
31
|
return evaluation_started()
|
|
30
32
|
if self is EvaluationStatusEnum.EVALUATION_FINISHED:
|
|
31
33
|
return evaluation_finished()
|
|
34
|
+
if self is EvaluationStatusEnum.EVALUATION_FINISHED_WITH_ERRORS:
|
|
35
|
+
return evaluation_finished_with_errors()
|
|
32
36
|
if self is EvaluationStatusEnum.EVALUATION_FAILED:
|
|
33
37
|
return evaluation_failed()
|
|
@@ -15,9 +15,7 @@ class EvaluationType(str, enum.Enum):
|
|
|
15
15
|
SINGLE_MODEL_TEST = "single_model_test"
|
|
16
16
|
|
|
17
17
|
def visit(
|
|
18
|
-
self,
|
|
19
|
-
human_a_b_testing: typing.Callable[[], T_Result],
|
|
20
|
-
single_model_test: typing.Callable[[], T_Result],
|
|
18
|
+
self, human_a_b_testing: typing.Callable[[], T_Result], single_model_test: typing.Callable[[], T_Result]
|
|
21
19
|
) -> T_Result:
|
|
22
20
|
if self is EvaluationType.HUMAN_A_B_TESTING:
|
|
23
21
|
return human_a_b_testing()
|
|
@@ -15,19 +15,11 @@ class EvaluationWebhook(pydantic.BaseModel):
|
|
|
15
15
|
score: float
|
|
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:
|
|
@@ -16,21 +16,14 @@ class Evaluator(pydantic.BaseModel):
|
|
|
16
16
|
key: str
|
|
17
17
|
direct_use: bool
|
|
18
18
|
settings_template: typing.Dict[str, typing.Any]
|
|
19
|
+
description: typing.Optional[str]
|
|
19
20
|
|
|
20
21
|
def json(self, **kwargs: typing.Any) -> str:
|
|
21
|
-
kwargs_with_defaults: typing.Any = {
|
|
22
|
-
"by_alias": True,
|
|
23
|
-
"exclude_unset": True,
|
|
24
|
-
**kwargs,
|
|
25
|
-
}
|
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
26
23
|
return super().json(**kwargs_with_defaults)
|
|
27
24
|
|
|
28
25
|
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
|
-
}
|
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
34
27
|
return super().dict(**kwargs_with_defaults)
|
|
35
28
|
|
|
36
29
|
class Config:
|
|
@@ -20,19 +20,11 @@ class EvaluatorConfig(pydantic.BaseModel):
|
|
|
20
20
|
updated_at: dt.datetime
|
|
21
21
|
|
|
22
22
|
def json(self, **kwargs: typing.Any) -> str:
|
|
23
|
-
kwargs_with_defaults: typing.Any = {
|
|
24
|
-
"by_alias": True,
|
|
25
|
-
"exclude_unset": True,
|
|
26
|
-
**kwargs,
|
|
27
|
-
}
|
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
28
24
|
return super().json(**kwargs_with_defaults)
|
|
29
25
|
|
|
30
26
|
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
|
-
}
|
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
36
28
|
return super().dict(**kwargs_with_defaults)
|
|
37
29
|
|
|
38
30
|
class Config:
|
|
@@ -19,19 +19,11 @@ class Feedback(pydantic.BaseModel):
|
|
|
19
19
|
created_at: typing.Optional[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:
|
|
@@ -11,26 +11,18 @@ except ImportError:
|
|
|
11
11
|
import pydantic # type: ignore
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
15
|
-
config_id: str
|
|
14
|
+
class GetConfigResponse(pydantic.BaseModel):
|
|
15
|
+
config_id: typing.Optional[str]
|
|
16
16
|
config_name: str
|
|
17
17
|
current_version: int
|
|
18
18
|
parameters: typing.Dict[str, typing.Any]
|
|
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 HttpValidationError(pydantic.BaseModel):
|
|
|
16
16
|
detail: typing.Optional[typing.List[ValidationError]]
|
|
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:
|
|
@@ -28,19 +28,11 @@ class HumanEvaluation(pydantic.BaseModel):
|
|
|
28
28
|
updated_at: dt.datetime
|
|
29
29
|
|
|
30
30
|
def json(self, **kwargs: typing.Any) -> str:
|
|
31
|
-
kwargs_with_defaults: typing.Any = {
|
|
32
|
-
"by_alias": True,
|
|
33
|
-
"exclude_unset": True,
|
|
34
|
-
**kwargs,
|
|
35
|
-
}
|
|
31
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
36
32
|
return super().json(**kwargs_with_defaults)
|
|
37
33
|
|
|
38
34
|
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
|
39
|
-
kwargs_with_defaults: typing.Any = {
|
|
40
|
-
"by_alias": True,
|
|
41
|
-
"exclude_unset": True,
|
|
42
|
-
**kwargs,
|
|
43
|
-
}
|
|
35
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
44
36
|
return super().dict(**kwargs_with_defaults)
|
|
45
37
|
|
|
46
38
|
class Config:
|
|
@@ -6,7 +6,7 @@ import typing
|
|
|
6
6
|
from ..core.datetime_utils import serialize_datetime
|
|
7
7
|
from .human_evaluation_scenario_input import HumanEvaluationScenarioInput
|
|
8
8
|
from .human_evaluation_scenario_output import HumanEvaluationScenarioOutput
|
|
9
|
-
from .
|
|
9
|
+
from .score import Score
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
import pydantic.v1 as pydantic # type: ignore
|
|
@@ -20,26 +20,18 @@ class HumanEvaluationScenario(pydantic.BaseModel):
|
|
|
20
20
|
inputs: typing.List[HumanEvaluationScenarioInput]
|
|
21
21
|
outputs: typing.List[HumanEvaluationScenarioOutput]
|
|
22
22
|
vote: typing.Optional[str]
|
|
23
|
-
score: typing.Optional[
|
|
23
|
+
score: typing.Optional[Score]
|
|
24
24
|
evaluation: typing.Optional[str]
|
|
25
25
|
correct_answer: typing.Optional[str]
|
|
26
26
|
is_pinned: typing.Optional[bool]
|
|
27
27
|
note: typing.Optional[str]
|
|
28
28
|
|
|
29
29
|
def json(self, **kwargs: typing.Any) -> str:
|
|
30
|
-
kwargs_with_defaults: typing.Any = {
|
|
31
|
-
"by_alias": True,
|
|
32
|
-
"exclude_unset": True,
|
|
33
|
-
**kwargs,
|
|
34
|
-
}
|
|
30
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
35
31
|
return super().json(**kwargs_with_defaults)
|
|
36
32
|
|
|
37
33
|
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
|
-
}
|
|
34
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
43
35
|
return super().dict(**kwargs_with_defaults)
|
|
44
36
|
|
|
45
37
|
class Config:
|
|
@@ -16,19 +16,11 @@ class HumanEvaluationScenarioInput(pydantic.BaseModel):
|
|
|
16
16
|
input_value: 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:
|
|
@@ -16,19 +16,11 @@ class HumanEvaluationScenarioOutput(pydantic.BaseModel):
|
|
|
16
16
|
variant_output: 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:
|
|
@@ -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 .human_evaluation_scenario_input import HumanEvaluationScenarioInput
|
|
8
|
+
from .human_evaluation_scenario_output import HumanEvaluationScenarioOutput
|
|
9
|
+
from .score import Score
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
13
|
+
except ImportError:
|
|
14
|
+
import pydantic # type: ignore
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class HumanEvaluationScenarioUpdate(pydantic.BaseModel):
|
|
18
|
+
vote: typing.Optional[str]
|
|
19
|
+
score: typing.Optional[Score]
|
|
20
|
+
correct_answer: typing.Optional[str]
|
|
21
|
+
outputs: typing.Optional[typing.List[HumanEvaluationScenarioOutput]]
|
|
22
|
+
inputs: typing.Optional[typing.List[HumanEvaluationScenarioInput]]
|
|
23
|
+
is_pinned: typing.Optional[bool]
|
|
24
|
+
note: 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,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
|
+
from .evaluation_status_enum import EvaluationStatusEnum
|
|
8
|
+
|
|
9
|
+
try:
|
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
|
11
|
+
except ImportError:
|
|
12
|
+
import pydantic # type: ignore
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class HumanEvaluationUpdate(pydantic.BaseModel):
|
|
16
|
+
status: typing.Optional[EvaluationStatusEnum]
|
|
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}
|
|
@@ -16,21 +16,14 @@ class Image(pydantic.BaseModel):
|
|
|
16
16
|
docker_id: str
|
|
17
17
|
tags: str
|
|
18
18
|
organization_id: typing.Optional[str]
|
|
19
|
+
workspace_id: typing.Optional[str]
|
|
19
20
|
|
|
20
21
|
def json(self, **kwargs: typing.Any) -> str:
|
|
21
|
-
kwargs_with_defaults: typing.Any = {
|
|
22
|
-
"by_alias": True,
|
|
23
|
-
"exclude_unset": True,
|
|
24
|
-
**kwargs,
|
|
25
|
-
}
|
|
22
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
26
23
|
return super().json(**kwargs_with_defaults)
|
|
27
24
|
|
|
28
25
|
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
|
-
}
|
|
26
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
|
34
27
|
return super().dict(**kwargs_with_defaults)
|
|
35
28
|
|
|
36
29
|
class Config:
|
|
@@ -13,21 +13,14 @@ except ImportError:
|
|
|
13
13
|
|
|
14
14
|
class InviteRequest(pydantic.BaseModel):
|
|
15
15
|
email: str
|
|
16
|
+
roles: typing.List[str]
|
|
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:
|
|
@@ -11,26 +11,18 @@ except ImportError:
|
|
|
11
11
|
import pydantic # type: ignore
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class ListApiKeysResponse(pydantic.BaseModel):
|
|
15
15
|
prefix: str
|
|
16
16
|
created_at: dt.datetime
|
|
17
17
|
last_used_at: typing.Optional[dt.datetime]
|
|
18
18
|
expiration_date: typing.Optional[dt.datetime]
|
|
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:
|
|
@@ -18,19 +18,11 @@ class LlmRunRateLimit(pydantic.BaseModel):
|
|
|
18
18
|
delay_between_batches: int
|
|
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:
|