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
|
@@ -1,45 +0,0 @@
|
|
|
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 .outputs import Outputs
|
|
6
|
-
import datetime as dt
|
|
7
|
-
from .llm_tokens import LlmTokens
|
|
8
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
|
-
import pydantic
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class CreateSpan(UniversalBaseModel):
|
|
13
|
-
id: str
|
|
14
|
-
app_id: str
|
|
15
|
-
project_id: typing.Optional[str] = None
|
|
16
|
-
variant_id: typing.Optional[str] = None
|
|
17
|
-
variant_name: typing.Optional[str] = None
|
|
18
|
-
inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
19
|
-
internals: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
20
|
-
outputs: typing.Optional[Outputs] = None
|
|
21
|
-
config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
22
|
-
environment: typing.Optional[str] = None
|
|
23
|
-
tags: typing.Optional[typing.List[str]] = None
|
|
24
|
-
token_consumption: typing.Optional[int] = None
|
|
25
|
-
name: str
|
|
26
|
-
parent_span_id: typing.Optional[str] = None
|
|
27
|
-
attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
28
|
-
spankind: str
|
|
29
|
-
status: str
|
|
30
|
-
user: typing.Optional[str] = None
|
|
31
|
-
start_time: dt.datetime
|
|
32
|
-
end_time: dt.datetime
|
|
33
|
-
tokens: typing.Optional[LlmTokens] = None
|
|
34
|
-
cost: typing.Optional[float] = None
|
|
35
|
-
|
|
36
|
-
if IS_PYDANTIC_V2:
|
|
37
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
38
|
-
extra="allow", frozen=True
|
|
39
|
-
) # type: ignore # Pydantic v2
|
|
40
|
-
else:
|
|
41
|
-
|
|
42
|
-
class Config:
|
|
43
|
-
frozen = True
|
|
44
|
-
smart_union = True
|
|
45
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,30 +0,0 @@
|
|
|
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 .score import Score
|
|
6
|
-
from .human_evaluation_scenario_output import HumanEvaluationScenarioOutput
|
|
7
|
-
from .human_evaluation_scenario_input import HumanEvaluationScenarioInput
|
|
8
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
|
-
import pydantic
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class HumanEvaluationScenarioUpdate(UniversalBaseModel):
|
|
13
|
-
vote: typing.Optional[str] = None
|
|
14
|
-
score: typing.Optional[Score] = None
|
|
15
|
-
correct_answer: typing.Optional[str] = None
|
|
16
|
-
outputs: typing.Optional[typing.List[HumanEvaluationScenarioOutput]] = None
|
|
17
|
-
inputs: typing.Optional[typing.List[HumanEvaluationScenarioInput]] = None
|
|
18
|
-
is_pinned: typing.Optional[bool] = None
|
|
19
|
-
note: typing.Optional[str] = None
|
|
20
|
-
|
|
21
|
-
if IS_PYDANTIC_V2:
|
|
22
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
23
|
-
extra="allow", frozen=True
|
|
24
|
-
) # type: ignore # Pydantic v2
|
|
25
|
-
else:
|
|
26
|
-
|
|
27
|
-
class Config:
|
|
28
|
-
frozen = True
|
|
29
|
-
smart_union = True
|
|
30
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,27 +0,0 @@
|
|
|
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 .evaluation_type import EvaluationType
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
-
import pydantic
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class NewHumanEvaluation(UniversalBaseModel):
|
|
11
|
-
app_id: str
|
|
12
|
-
variant_ids: typing.List[str]
|
|
13
|
-
evaluation_type: EvaluationType
|
|
14
|
-
inputs: typing.List[str]
|
|
15
|
-
testset_id: str
|
|
16
|
-
status: str
|
|
17
|
-
|
|
18
|
-
if IS_PYDANTIC_V2:
|
|
19
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
20
|
-
extra="allow", frozen=True
|
|
21
|
-
) # type: ignore # Pydantic v2
|
|
22
|
-
else:
|
|
23
|
-
|
|
24
|
-
class Config:
|
|
25
|
-
frozen = True
|
|
26
|
-
smart_union = True
|
|
27
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
|
-
import typing
|
|
6
|
-
import datetime as dt
|
|
7
|
-
from .span_variant import SpanVariant
|
|
8
|
-
from .span_status_code import SpanStatusCode
|
|
9
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
10
|
-
import pydantic
|
|
11
|
-
from ..core.pydantic_utilities import update_forward_refs
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class Span(UniversalBaseModel):
|
|
15
|
-
id: str
|
|
16
|
-
name: str
|
|
17
|
-
project_id: typing.Optional[str] = None
|
|
18
|
-
parent_span_id: typing.Optional[str] = None
|
|
19
|
-
created_at: dt.datetime
|
|
20
|
-
variant: SpanVariant
|
|
21
|
-
environment: typing.Optional[str] = None
|
|
22
|
-
spankind: str
|
|
23
|
-
status: SpanStatusCode
|
|
24
|
-
metadata: typing.Dict[str, typing.Optional[typing.Any]]
|
|
25
|
-
trace_id: str
|
|
26
|
-
user_id: typing.Optional[str] = None
|
|
27
|
-
content: typing.Dict[str, typing.Optional[typing.Any]]
|
|
28
|
-
children: typing.Optional[typing.List["Span"]] = None
|
|
29
|
-
|
|
30
|
-
if IS_PYDANTIC_V2:
|
|
31
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
32
|
-
extra="allow", frozen=True
|
|
33
|
-
) # type: ignore # Pydantic v2
|
|
34
|
-
else:
|
|
35
|
-
|
|
36
|
-
class Config:
|
|
37
|
-
frozen = True
|
|
38
|
-
smart_union = True
|
|
39
|
-
extra = pydantic.Extra.allow
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
update_forward_refs(Span)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
|
-
from .span import Span
|
|
6
|
-
import typing
|
|
7
|
-
import datetime as dt
|
|
8
|
-
from .span_variant import SpanVariant
|
|
9
|
-
from .span_status_code import SpanStatusCode
|
|
10
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
|
-
import pydantic
|
|
12
|
-
from ..core.pydantic_utilities import update_forward_refs
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class SpanDetail(UniversalBaseModel):
|
|
16
|
-
id: str
|
|
17
|
-
name: str
|
|
18
|
-
project_id: typing.Optional[str] = None
|
|
19
|
-
parent_span_id: typing.Optional[str] = None
|
|
20
|
-
created_at: dt.datetime
|
|
21
|
-
variant: SpanVariant
|
|
22
|
-
environment: typing.Optional[str] = None
|
|
23
|
-
spankind: str
|
|
24
|
-
status: SpanStatusCode
|
|
25
|
-
metadata: typing.Dict[str, typing.Optional[typing.Any]]
|
|
26
|
-
trace_id: str
|
|
27
|
-
user_id: typing.Optional[str] = None
|
|
28
|
-
content: typing.Dict[str, typing.Optional[typing.Any]]
|
|
29
|
-
children: typing.Optional[typing.List[Span]] = None
|
|
30
|
-
config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
31
|
-
|
|
32
|
-
if IS_PYDANTIC_V2:
|
|
33
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
34
|
-
extra="allow", frozen=True
|
|
35
|
-
) # type: ignore # Pydantic v2
|
|
36
|
-
else:
|
|
37
|
-
|
|
38
|
-
class Config:
|
|
39
|
-
frozen = True
|
|
40
|
-
smart_union = True
|
|
41
|
-
extra = pydantic.Extra.allow
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
update_forward_refs(Span, SpanDetail=SpanDetail)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
|
-
from .span import Span
|
|
6
|
-
import typing
|
|
7
|
-
import datetime as dt
|
|
8
|
-
from .span_variant import SpanVariant
|
|
9
|
-
from .span_status_code import SpanStatusCode
|
|
10
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
|
-
import pydantic
|
|
12
|
-
from ..core.pydantic_utilities import update_forward_refs
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class TraceDetail(UniversalBaseModel):
|
|
16
|
-
id: str
|
|
17
|
-
name: str
|
|
18
|
-
project_id: typing.Optional[str] = None
|
|
19
|
-
parent_span_id: typing.Optional[str] = None
|
|
20
|
-
created_at: dt.datetime
|
|
21
|
-
variant: SpanVariant
|
|
22
|
-
environment: typing.Optional[str] = None
|
|
23
|
-
spankind: str
|
|
24
|
-
status: SpanStatusCode
|
|
25
|
-
metadata: typing.Dict[str, typing.Optional[typing.Any]]
|
|
26
|
-
trace_id: str
|
|
27
|
-
user_id: typing.Optional[str] = None
|
|
28
|
-
content: typing.Dict[str, typing.Optional[typing.Any]]
|
|
29
|
-
children: typing.Optional[typing.List[Span]] = None
|
|
30
|
-
config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
31
|
-
|
|
32
|
-
if IS_PYDANTIC_V2:
|
|
33
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
34
|
-
extra="allow", frozen=True
|
|
35
|
-
) # type: ignore # Pydantic v2
|
|
36
|
-
else:
|
|
37
|
-
|
|
38
|
-
class Config:
|
|
39
|
-
frozen = True
|
|
40
|
-
smart_union = True
|
|
41
|
-
extra = pydantic.Extra.allow
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
update_forward_refs(Span, TraceDetail=TraceDetail)
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
-
import typing
|
|
5
|
-
import typing_extensions
|
|
6
|
-
from ..core.serialization import FieldMetadata
|
|
7
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
-
import pydantic
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class WithPagination(UniversalBaseModel):
|
|
12
|
-
data: typing.List[typing.Optional[typing.Any]]
|
|
13
|
-
total: int
|
|
14
|
-
page: int
|
|
15
|
-
page_size: typing_extensions.Annotated[int, FieldMetadata(alias="pageSize")]
|
|
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
|
|
File without changes
|
|
File without changes
|
/agenta/client/backend/{observability_v_1 → observability}/types/query_analytics_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|