agenta 0.32.0a1__py3-none-any.whl → 0.33.0__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.
- agenta/__init__.py +2 -0
- agenta/client/backend/__init__.py +39 -31
- agenta/client/backend/admin/__init__.py +1 -0
- agenta/client/backend/admin/client.py +576 -0
- agenta/client/backend/apps/client.py +450 -68
- agenta/client/backend/bases/client.py +10 -10
- agenta/client/backend/client.py +112 -122
- agenta/client/backend/containers/client.py +70 -28
- agenta/client/backend/core/http_client.py +3 -3
- agenta/client/backend/environments/client.py +8 -8
- agenta/client/backend/evaluations/client.py +46 -52
- agenta/client/backend/evaluators/client.py +32 -32
- agenta/client/backend/human_evaluations/__init__.py +1 -0
- agenta/client/backend/human_evaluations/client.py +1692 -0
- agenta/client/backend/observability/__init__.py +4 -0
- agenta/client/backend/observability/client.py +221 -744
- agenta/client/backend/testsets/client.py +38 -202
- agenta/client/backend/types/__init__.py +34 -28
- agenta/client/backend/types/account_response.py +24 -0
- agenta/client/backend/types/app_variant_revision.py +2 -1
- agenta/client/backend/types/{create_trace_response.py → delete_evaluation.py} +2 -3
- agenta/client/backend/types/{evaluation_scenario_score_update.py → legacy_scope_request.py} +2 -2
- agenta/client/backend/types/legacy_scopes_response.py +29 -0
- agenta/client/backend/types/{human_evaluation_update.py → legacy_user_request.py} +4 -4
- agenta/client/backend/types/{span_variant.py → legacy_user_response.py} +2 -4
- agenta/client/backend/types/organization_membership_request.py +25 -0
- agenta/client/backend/types/organization_request.py +23 -0
- agenta/client/backend/types/permission.py +4 -0
- agenta/client/backend/types/{llm_tokens.py → project_membership_request.py} +8 -5
- agenta/client/backend/types/project_request.py +26 -0
- agenta/client/backend/types/project_scope.py +29 -0
- agenta/client/backend/types/provider_kind.py +1 -1
- agenta/client/backend/types/reference.py +22 -0
- agenta/client/backend/types/role.py +15 -0
- agenta/client/backend/types/scopes_response_model.py +22 -0
- agenta/client/backend/types/score.py +1 -1
- agenta/client/backend/types/secret_response_dto.py +2 -2
- agenta/client/backend/types/user_request.py +22 -0
- agenta/client/backend/types/workspace_membership_request.py +26 -0
- agenta/client/backend/types/workspace_request.py +25 -0
- agenta/client/backend/variants/client.py +208 -42
- agenta/client/backend/vault/client.py +11 -9
- agenta/sdk/__init__.py +3 -0
- agenta/sdk/agenta_init.py +3 -1
- agenta/sdk/assets.py +4 -4
- agenta/sdk/decorators/routing.py +129 -23
- agenta/sdk/decorators/tracing.py +16 -4
- agenta/sdk/litellm/litellm.py +44 -8
- agenta/sdk/litellm/mockllm.py +2 -2
- agenta/sdk/litellm/mocks/__init__.py +9 -3
- agenta/sdk/managers/apps.py +64 -0
- agenta/sdk/managers/shared.py +2 -2
- agenta/sdk/middleware/auth.py +156 -53
- agenta/sdk/middleware/config.py +28 -16
- agenta/sdk/middleware/inline.py +1 -1
- agenta/sdk/middleware/mock.py +1 -1
- agenta/sdk/middleware/otel.py +1 -1
- agenta/sdk/middleware/vault.py +1 -1
- agenta/sdk/tracing/exporters.py +0 -1
- agenta/sdk/tracing/inline.py +26 -30
- agenta/sdk/types.py +12 -9
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/METADATA +23 -20
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/RECORD +69 -63
- agenta/client/backend/observability_v_1/__init__.py +0 -5
- agenta/client/backend/observability_v_1/client.py +0 -763
- agenta/client/backend/types/create_span.py +0 -45
- agenta/client/backend/types/human_evaluation_scenario_update.py +0 -30
- agenta/client/backend/types/new_human_evaluation.py +0 -27
- agenta/client/backend/types/outputs.py +0 -5
- agenta/client/backend/types/span.py +0 -42
- agenta/client/backend/types/span_detail.py +0 -44
- agenta/client/backend/types/span_status_code.py +0 -5
- agenta/client/backend/types/trace_detail.py +0 -44
- agenta/client/backend/types/with_pagination.py +0 -26
- /agenta/client/backend/{observability_v_1 → observability}/types/__init__.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/format.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/query_analytics_response.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/query_traces_response.py +0 -0
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/WHEEL +0 -0
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class LegacyScopesResponse(UniversalBaseModel):
|
|
10
|
+
organization_id: typing.Optional[str] = None
|
|
11
|
+
organization_name: typing.Optional[str] = None
|
|
12
|
+
workspace_id: typing.Optional[str] = None
|
|
13
|
+
workspace_name: typing.Optional[str] = None
|
|
14
|
+
project_id: typing.Optional[str] = None
|
|
15
|
+
project_name: typing.Optional[str] = None
|
|
16
|
+
is_demo: typing.Optional[bool] = None
|
|
17
|
+
user_role: typing.Optional[str] = None
|
|
18
|
+
credentials: typing.Optional[str] = None
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
22
|
+
extra="allow", frozen=True
|
|
23
|
+
) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
-
import typing
|
|
5
|
-
from .evaluation_status_enum import EvaluationStatusEnum
|
|
6
4
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
import typing
|
|
7
6
|
import pydantic
|
|
8
7
|
|
|
9
8
|
|
|
10
|
-
class
|
|
11
|
-
|
|
9
|
+
class LegacyUserRequest(UniversalBaseModel):
|
|
10
|
+
name: str
|
|
11
|
+
email: str
|
|
12
12
|
|
|
13
13
|
if IS_PYDANTIC_V2:
|
|
14
14
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
@@ -6,10 +6,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
10
|
-
|
|
11
|
-
variant_name: typing.Optional[str] = None
|
|
12
|
-
revision: typing.Optional[int] = None
|
|
9
|
+
class LegacyUserResponse(UniversalBaseModel):
|
|
10
|
+
id: typing.Optional[str] = None
|
|
13
11
|
|
|
14
12
|
if IS_PYDANTIC_V2:
|
|
15
13
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .reference import Reference
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import pydantic
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OrganizationMembershipRequest(UniversalBaseModel):
|
|
11
|
+
role: typing.Literal["owner"] = "owner"
|
|
12
|
+
is_demo: bool
|
|
13
|
+
user_ref: Reference
|
|
14
|
+
organization_ref: Reference
|
|
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
|
|
@@ -0,0 +1,23 @@
|
|
|
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 OrganizationRequest(UniversalBaseModel):
|
|
10
|
+
name: str
|
|
11
|
+
description: str
|
|
12
|
+
is_paying: bool
|
|
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:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -14,6 +14,10 @@ Permission = typing.Union[
|
|
|
14
14
|
"modify_variant_configurations",
|
|
15
15
|
"delete_application_variant",
|
|
16
16
|
"run_service",
|
|
17
|
+
"create_secret",
|
|
18
|
+
"view_secret",
|
|
19
|
+
"update_secret",
|
|
20
|
+
"delete_secret",
|
|
17
21
|
"view_app_environment_deployment",
|
|
18
22
|
"edit_app_environment_deployment",
|
|
19
23
|
"create_app_environment_deployment",
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
-
import
|
|
4
|
+
from .role import Role
|
|
5
|
+
from .reference import Reference
|
|
5
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
6
8
|
import pydantic
|
|
7
9
|
|
|
8
10
|
|
|
9
|
-
class
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
class ProjectMembershipRequest(UniversalBaseModel):
|
|
12
|
+
role: Role
|
|
13
|
+
is_demo: bool
|
|
14
|
+
user_ref: Reference
|
|
15
|
+
project_ref: Reference
|
|
13
16
|
|
|
14
17
|
if IS_PYDANTIC_V2:
|
|
15
18
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from .reference import Reference
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
|
+
import pydantic
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ProjectRequest(UniversalBaseModel):
|
|
11
|
+
name: str
|
|
12
|
+
description: str
|
|
13
|
+
is_default: bool
|
|
14
|
+
workspace_ref: Reference
|
|
15
|
+
organization_ref: Reference
|
|
16
|
+
|
|
17
|
+
if IS_PYDANTIC_V2:
|
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
19
|
+
extra="allow", frozen=True
|
|
20
|
+
) # type: ignore # Pydantic v2
|
|
21
|
+
else:
|
|
22
|
+
|
|
23
|
+
class Config:
|
|
24
|
+
frozen = True
|
|
25
|
+
smart_union = True
|
|
26
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from .role import Role
|
|
5
|
+
from .reference import Reference
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
8
|
+
import pydantic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProjectScope(UniversalBaseModel):
|
|
12
|
+
credentials: str
|
|
13
|
+
role: Role
|
|
14
|
+
tier: str
|
|
15
|
+
user: Reference
|
|
16
|
+
project: Reference
|
|
17
|
+
workspace: Reference
|
|
18
|
+
organization: Reference
|
|
19
|
+
|
|
20
|
+
if IS_PYDANTIC_V2:
|
|
21
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
22
|
+
extra="allow", frozen=True
|
|
23
|
+
) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
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
|
+
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Reference(UniversalBaseModel):
|
|
10
|
+
id: typing.Optional[str] = None
|
|
11
|
+
slug: typing.Optional[str] = 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
|
+
import typing
|
|
5
|
+
from .project_scope import ProjectScope
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import pydantic
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ScopesResponseModel(UniversalBaseModel):
|
|
11
|
+
projects: typing.Optional[typing.Dict[str, typing.Dict[str, ProjectScope]]] = 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
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
-
import typing
|
|
5
4
|
from .header_dto import HeaderDto
|
|
6
5
|
from .secret_dto import SecretDto
|
|
6
|
+
import typing
|
|
7
7
|
from .lifecycle_dto import LifecycleDto
|
|
8
8
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
import pydantic
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class SecretResponseDto(UniversalBaseModel):
|
|
13
|
-
header:
|
|
13
|
+
header: HeaderDto
|
|
14
14
|
secret: SecretDto
|
|
15
15
|
id: str
|
|
16
16
|
lifecycle: typing.Optional[LifecycleDto] = None
|
|
@@ -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 UserRequest(UniversalBaseModel):
|
|
10
|
+
name: str
|
|
11
|
+
email: 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
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from .role import Role
|
|
5
|
+
from .reference import Reference
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
8
|
+
import pydantic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class WorkspaceMembershipRequest(UniversalBaseModel):
|
|
12
|
+
role: Role
|
|
13
|
+
is_demo: bool
|
|
14
|
+
user_ref: Reference
|
|
15
|
+
workspace_ref: Reference
|
|
16
|
+
|
|
17
|
+
if IS_PYDANTIC_V2:
|
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
19
|
+
extra="allow", frozen=True
|
|
20
|
+
) # type: ignore # Pydantic v2
|
|
21
|
+
else:
|
|
22
|
+
|
|
23
|
+
class Config:
|
|
24
|
+
frozen = True
|
|
25
|
+
smart_union = True
|
|
26
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from .reference import Reference
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
|
+
import pydantic
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WorkspaceRequest(UniversalBaseModel):
|
|
11
|
+
name: str
|
|
12
|
+
description: str
|
|
13
|
+
is_default: bool
|
|
14
|
+
organization_ref: Reference
|
|
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
|