agenta 0.12.3__py3-none-any.whl → 0.32.0a1__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 +64 -7
- agenta/cli/helper.py +7 -3
- agenta/cli/main.py +15 -50
- agenta/cli/variant_commands.py +50 -29
- agenta/client/Readme.md +72 -64
- agenta/client/api.py +2 -2
- agenta/client/backend/__init__.py +193 -22
- agenta/client/backend/access_control/__init__.py +1 -0
- agenta/client/backend/access_control/client.py +167 -0
- agenta/client/backend/apps/__init__.py +1 -0
- agenta/client/backend/apps/client.py +1691 -0
- agenta/client/backend/bases/__init__.py +1 -0
- agenta/client/backend/bases/client.py +190 -0
- agenta/client/backend/client.py +2508 -5712
- agenta/client/backend/configs/__init__.py +1 -0
- agenta/client/backend/configs/client.py +604 -0
- agenta/client/backend/containers/__init__.py +5 -0
- agenta/client/backend/containers/client.py +648 -0
- agenta/client/backend/containers/types/__init__.py +5 -0
- agenta/client/backend/{types → containers/types}/container_templates_response.py +1 -2
- agenta/client/backend/core/__init__.py +30 -0
- agenta/client/backend/core/client_wrapper.py +42 -9
- agenta/client/backend/core/file.py +70 -0
- agenta/client/backend/core/http_client.py +575 -0
- agenta/client/backend/core/jsonable_encoder.py +33 -39
- agenta/client/backend/core/pydantic_utilities.py +325 -0
- agenta/client/backend/core/query_encoder.py +60 -0
- agenta/client/backend/core/remove_none_from_dict.py +2 -2
- agenta/client/backend/core/request_options.py +35 -0
- agenta/client/backend/core/serialization.py +276 -0
- agenta/client/backend/environments/__init__.py +1 -0
- agenta/client/backend/environments/client.py +196 -0
- agenta/client/backend/evaluations/__init__.py +1 -0
- agenta/client/backend/evaluations/client.py +1469 -0
- agenta/client/backend/evaluators/__init__.py +1 -0
- agenta/client/backend/evaluators/client.py +1283 -0
- agenta/client/backend/observability/__init__.py +1 -0
- agenta/client/backend/observability/client.py +1286 -0
- agenta/client/backend/observability_v_1/__init__.py +5 -0
- agenta/client/backend/observability_v_1/client.py +763 -0
- agenta/client/backend/observability_v_1/types/__init__.py +7 -0
- agenta/client/backend/observability_v_1/types/format.py +5 -0
- agenta/client/backend/observability_v_1/types/query_analytics_response.py +7 -0
- agenta/client/backend/observability_v_1/types/query_traces_response.py +11 -0
- agenta/client/backend/scopes/__init__.py +1 -0
- agenta/client/backend/scopes/client.py +114 -0
- agenta/client/backend/testsets/__init__.py +1 -0
- agenta/client/backend/testsets/client.py +1284 -0
- agenta/client/backend/types/__init__.py +154 -26
- agenta/client/backend/types/agenta_node_dto.py +48 -0
- agenta/client/backend/types/agenta_node_dto_nodes_value.py +6 -0
- agenta/client/backend/types/agenta_nodes_response.py +30 -0
- agenta/client/backend/types/agenta_root_dto.py +30 -0
- agenta/client/backend/types/agenta_roots_response.py +30 -0
- agenta/client/backend/types/agenta_tree_dto.py +30 -0
- agenta/client/backend/types/agenta_trees_response.py +30 -0
- agenta/client/backend/types/aggregated_result.py +16 -31
- agenta/client/backend/types/aggregated_result_evaluator_config.py +8 -0
- agenta/client/backend/types/analytics_response.py +24 -0
- agenta/client/backend/types/app.py +17 -30
- agenta/client/backend/types/app_variant_response.py +36 -0
- agenta/client/backend/types/app_variant_revision.py +17 -32
- agenta/client/backend/types/base_output.py +13 -28
- agenta/client/backend/types/body_import_testset.py +15 -31
- agenta/client/backend/types/bucket_dto.py +26 -0
- agenta/client/backend/types/collect_status_response.py +22 -0
- agenta/client/backend/types/config_db.py +16 -31
- agenta/client/backend/types/config_dto.py +32 -0
- agenta/client/backend/types/config_response_model.py +32 -0
- agenta/client/backend/types/correct_answer.py +22 -0
- agenta/client/backend/types/create_app_output.py +13 -28
- agenta/client/backend/types/create_span.py +45 -0
- agenta/client/backend/types/create_trace_response.py +22 -0
- agenta/client/backend/types/docker_env_vars.py +13 -28
- agenta/client/backend/types/environment_output.py +22 -34
- agenta/client/backend/types/environment_output_extended.py +31 -0
- agenta/client/backend/types/environment_revision.py +26 -0
- agenta/client/backend/types/error.py +22 -0
- agenta/client/backend/types/evaluation.py +22 -33
- agenta/client/backend/types/evaluation_scenario.py +18 -33
- agenta/client/backend/types/evaluation_scenario_input.py +16 -31
- agenta/client/backend/types/evaluation_scenario_output.py +17 -30
- agenta/client/backend/types/evaluation_scenario_result.py +14 -29
- agenta/client/backend/types/evaluation_scenario_score_update.py +21 -0
- agenta/client/backend/types/evaluation_status_enum.py +11 -29
- agenta/client/backend/types/evaluation_type.py +3 -21
- agenta/client/backend/types/evaluator.py +20 -31
- agenta/client/backend/types/evaluator_config.py +21 -33
- agenta/client/backend/types/evaluator_mapping_output_interface.py +21 -0
- agenta/client/backend/types/evaluator_output_interface.py +21 -0
- agenta/client/backend/types/exception_dto.py +26 -0
- agenta/client/backend/types/get_config_response.py +23 -0
- agenta/client/backend/types/header_dto.py +22 -0
- agenta/client/backend/types/http_validation_error.py +14 -29
- agenta/client/backend/types/human_evaluation.py +18 -34
- agenta/client/backend/types/human_evaluation_scenario.py +22 -38
- agenta/client/backend/types/human_evaluation_scenario_input.py +13 -28
- agenta/client/backend/types/human_evaluation_scenario_output.py +13 -28
- agenta/client/backend/types/human_evaluation_scenario_update.py +30 -0
- agenta/client/backend/types/human_evaluation_update.py +22 -0
- agenta/client/backend/types/image.py +18 -32
- agenta/client/backend/types/invite_request.py +16 -30
- agenta/client/backend/types/legacy_analytics_response.py +29 -0
- agenta/client/backend/types/legacy_data_point.py +27 -0
- agenta/client/backend/types/lifecycle_dto.py +24 -0
- agenta/client/backend/types/link_dto.py +24 -0
- agenta/client/backend/types/list_api_keys_response.py +24 -0
- agenta/client/backend/types/llm_run_rate_limit.py +13 -28
- agenta/client/backend/types/llm_tokens.py +23 -0
- agenta/client/backend/types/metrics_dto.py +24 -0
- agenta/client/backend/types/new_human_evaluation.py +27 -0
- agenta/client/backend/types/new_testset.py +16 -31
- agenta/client/backend/types/node_dto.py +24 -0
- agenta/client/backend/types/node_type.py +19 -0
- agenta/client/backend/types/o_tel_context_dto.py +22 -0
- agenta/client/backend/types/o_tel_event_dto.py +23 -0
- agenta/client/backend/types/o_tel_extra_dto.py +26 -0
- agenta/client/backend/types/o_tel_link_dto.py +23 -0
- agenta/client/backend/types/o_tel_span_dto.py +37 -0
- agenta/client/backend/types/o_tel_span_kind.py +15 -0
- agenta/client/backend/types/o_tel_spans_response.py +24 -0
- agenta/client/backend/types/o_tel_status_code.py +8 -0
- agenta/client/backend/types/organization.py +22 -35
- agenta/client/backend/types/organization_output.py +13 -28
- agenta/client/backend/types/outputs.py +5 -0
- agenta/client/backend/types/parent_dto.py +21 -0
- agenta/client/backend/types/permission.py +41 -0
- agenta/client/backend/types/projects_response.py +28 -0
- agenta/client/backend/types/provider_key_dto.py +23 -0
- agenta/client/backend/types/provider_kind.py +21 -0
- agenta/client/backend/types/reference_dto.py +23 -0
- agenta/client/backend/types/reference_request_model.py +23 -0
- agenta/client/backend/types/result.py +18 -31
- agenta/client/backend/types/root_dto.py +21 -0
- agenta/client/backend/types/{human_evaluation_scenario_score.py → score.py} +1 -1
- agenta/client/backend/types/secret_dto.py +24 -0
- agenta/client/backend/types/{human_evaluation_scenario_update_score.py → secret_kind.py} +1 -1
- agenta/client/backend/types/secret_response_dto.py +27 -0
- agenta/client/backend/types/simple_evaluation_output.py +13 -28
- agenta/client/backend/types/span.py +39 -49
- agenta/client/backend/types/span_detail.py +44 -0
- agenta/client/backend/types/span_dto.py +54 -0
- agenta/client/backend/types/span_dto_nodes_value.py +9 -0
- agenta/client/backend/types/span_status_code.py +5 -0
- agenta/client/backend/types/span_variant.py +23 -0
- agenta/client/backend/types/status_code.py +5 -0
- agenta/client/backend/types/status_dto.py +23 -0
- agenta/client/backend/types/template.py +14 -29
- agenta/client/backend/types/template_image_info.py +21 -35
- agenta/client/backend/types/test_set_output_response.py +20 -33
- agenta/client/backend/types/test_set_simple_response.py +13 -28
- agenta/client/backend/types/time_dto.py +23 -0
- agenta/client/backend/types/trace_detail.py +44 -0
- agenta/client/backend/types/tree_dto.py +23 -0
- agenta/client/backend/types/tree_type.py +5 -0
- agenta/client/backend/types/update_app_output.py +22 -0
- agenta/client/backend/types/uri.py +13 -28
- agenta/client/backend/types/validation_error.py +13 -28
- agenta/client/backend/types/variant_action.py +14 -29
- agenta/client/backend/types/variant_action_enum.py +1 -19
- agenta/client/backend/types/with_pagination.py +26 -0
- agenta/client/backend/types/workspace_member_response.py +23 -0
- agenta/client/backend/types/workspace_permission.py +25 -0
- agenta/client/backend/types/workspace_response.py +29 -0
- agenta/client/backend/types/workspace_role.py +15 -0
- agenta/client/backend/types/workspace_role_response.py +23 -0
- agenta/client/backend/variants/__init__.py +5 -0
- agenta/client/backend/variants/client.py +2814 -0
- agenta/client/backend/variants/types/__init__.py +7 -0
- agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py +8 -0
- agenta/client/backend/vault/__init__.py +1 -0
- agenta/client/backend/vault/client.py +685 -0
- agenta/client/client.py +1 -1
- agenta/config.py +0 -2
- agenta/config.toml +0 -1
- agenta/docker/docker-assets/Dockerfile.cloud.template +2 -1
- agenta/docker/docker-assets/Dockerfile.template +2 -1
- agenta/docker/docker_utils.py +11 -12
- agenta/sdk/__init__.py +58 -7
- agenta/sdk/agenta_init.py +182 -164
- agenta/sdk/assets.py +95 -0
- agenta/sdk/client.py +56 -0
- agenta/sdk/context/__init__.py +0 -0
- agenta/sdk/context/exporting.py +25 -0
- agenta/sdk/context/routing.py +27 -0
- agenta/sdk/context/tracing.py +28 -0
- agenta/sdk/decorators/__init__.py +0 -0
- agenta/sdk/decorators/routing.py +576 -0
- agenta/sdk/decorators/tracing.py +296 -0
- agenta/sdk/litellm/__init__.py +1 -0
- agenta/sdk/litellm/litellm.py +314 -0
- agenta/sdk/litellm/mockllm.py +27 -0
- agenta/sdk/litellm/mocks/__init__.py +26 -0
- agenta/sdk/managers/__init__.py +6 -0
- agenta/sdk/managers/config.py +208 -0
- agenta/sdk/managers/deployment.py +45 -0
- agenta/sdk/managers/secrets.py +38 -0
- agenta/sdk/managers/shared.py +639 -0
- agenta/sdk/managers/variant.py +182 -0
- agenta/sdk/managers/vault.py +16 -0
- agenta/sdk/middleware/__init__.py +0 -0
- agenta/sdk/middleware/auth.py +180 -0
- agenta/sdk/middleware/cache.py +47 -0
- agenta/sdk/middleware/config.py +255 -0
- agenta/sdk/middleware/cors.py +29 -0
- agenta/sdk/middleware/inline.py +38 -0
- agenta/sdk/middleware/mock.py +33 -0
- agenta/sdk/middleware/otel.py +40 -0
- agenta/sdk/middleware/vault.py +145 -0
- agenta/sdk/router.py +0 -7
- agenta/sdk/tracing/__init__.py +1 -0
- agenta/sdk/tracing/attributes.py +141 -0
- agenta/sdk/tracing/conventions.py +49 -0
- agenta/sdk/tracing/exporters.py +103 -0
- agenta/sdk/tracing/inline.py +1146 -0
- agenta/sdk/tracing/processors.py +121 -0
- agenta/sdk/tracing/spans.py +136 -0
- agenta/sdk/tracing/tracing.py +237 -0
- agenta/sdk/types.py +478 -74
- agenta/sdk/utils/__init__.py +0 -0
- agenta/sdk/utils/constants.py +1 -0
- agenta/sdk/utils/{helper/openai_cost.py → costs.py} +3 -0
- agenta/sdk/utils/exceptions.py +59 -0
- agenta/sdk/utils/globals.py +6 -10
- agenta/sdk/utils/helpers.py +8 -0
- agenta/sdk/utils/logging.py +21 -0
- agenta/sdk/utils/singleton.py +13 -0
- agenta/sdk/utils/timing.py +58 -0
- {agenta-0.12.3.dist-info → agenta-0.32.0a1.dist-info}/METADATA +98 -151
- agenta-0.32.0a1.dist-info/RECORD +263 -0
- {agenta-0.12.3.dist-info → agenta-0.32.0a1.dist-info}/WHEEL +1 -1
- agenta/client/backend/types/add_variant_from_base_and_config_response.py +0 -7
- agenta/client/backend/types/app_variant_output.py +0 -47
- agenta/client/backend/types/app_variant_output_extended.py +0 -50
- agenta/client/backend/types/delete_evaluation.py +0 -36
- agenta/client/backend/types/evaluation_webhook.py +0 -36
- agenta/client/backend/types/feedback.py +0 -40
- agenta/client/backend/types/get_config_reponse.py +0 -39
- agenta/client/backend/types/list_api_keys_output.py +0 -39
- agenta/client/backend/types/trace.py +0 -48
- agenta/sdk/agenta_decorator.py +0 -443
- agenta/sdk/context.py +0 -41
- agenta-0.12.3.dist-info/RECORD +0 -114
- {agenta-0.12.3.dist-info → agenta-0.32.0a1.dist-info}/entry_points.txt +0 -0
|
@@ -1,115 +1,286 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from .types import (
|
|
4
|
-
|
|
4
|
+
AgentaNodeDto,
|
|
5
|
+
AgentaNodeDtoNodesValue,
|
|
6
|
+
AgentaNodesResponse,
|
|
7
|
+
AgentaRootDto,
|
|
8
|
+
AgentaRootsResponse,
|
|
9
|
+
AgentaTreeDto,
|
|
10
|
+
AgentaTreesResponse,
|
|
5
11
|
AggregatedResult,
|
|
12
|
+
AggregatedResultEvaluatorConfig,
|
|
13
|
+
AnalyticsResponse,
|
|
6
14
|
App,
|
|
7
|
-
|
|
8
|
-
AppVariantOutputExtended,
|
|
15
|
+
AppVariantResponse,
|
|
9
16
|
AppVariantRevision,
|
|
10
17
|
BaseOutput,
|
|
11
18
|
BodyImportTestset,
|
|
19
|
+
BucketDto,
|
|
20
|
+
CollectStatusResponse,
|
|
12
21
|
ConfigDb,
|
|
13
|
-
|
|
22
|
+
ConfigDto,
|
|
23
|
+
ConfigResponseModel,
|
|
24
|
+
CorrectAnswer,
|
|
14
25
|
CreateAppOutput,
|
|
15
|
-
|
|
26
|
+
CreateSpan,
|
|
27
|
+
CreateTraceResponse,
|
|
16
28
|
DockerEnvVars,
|
|
17
29
|
EnvironmentOutput,
|
|
30
|
+
EnvironmentOutputExtended,
|
|
31
|
+
EnvironmentRevision,
|
|
32
|
+
Error,
|
|
18
33
|
Evaluation,
|
|
19
34
|
EvaluationScenario,
|
|
20
35
|
EvaluationScenarioInput,
|
|
21
36
|
EvaluationScenarioOutput,
|
|
22
37
|
EvaluationScenarioResult,
|
|
38
|
+
EvaluationScenarioScoreUpdate,
|
|
23
39
|
EvaluationStatusEnum,
|
|
24
40
|
EvaluationType,
|
|
25
|
-
EvaluationWebhook,
|
|
26
41
|
Evaluator,
|
|
27
42
|
EvaluatorConfig,
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
EvaluatorMappingOutputInterface,
|
|
44
|
+
EvaluatorOutputInterface,
|
|
45
|
+
ExceptionDto,
|
|
46
|
+
GetConfigResponse,
|
|
47
|
+
HeaderDto,
|
|
30
48
|
HttpValidationError,
|
|
31
49
|
HumanEvaluation,
|
|
32
50
|
HumanEvaluationScenario,
|
|
33
51
|
HumanEvaluationScenarioInput,
|
|
34
52
|
HumanEvaluationScenarioOutput,
|
|
35
|
-
|
|
36
|
-
|
|
53
|
+
HumanEvaluationScenarioUpdate,
|
|
54
|
+
HumanEvaluationUpdate,
|
|
37
55
|
Image,
|
|
38
56
|
InviteRequest,
|
|
39
|
-
|
|
57
|
+
LegacyAnalyticsResponse,
|
|
58
|
+
LegacyDataPoint,
|
|
59
|
+
LifecycleDto,
|
|
60
|
+
LinkDto,
|
|
61
|
+
ListApiKeysResponse,
|
|
40
62
|
LlmRunRateLimit,
|
|
63
|
+
LlmTokens,
|
|
64
|
+
MetricsDto,
|
|
65
|
+
NewHumanEvaluation,
|
|
41
66
|
NewTestset,
|
|
67
|
+
NodeDto,
|
|
68
|
+
NodeType,
|
|
69
|
+
OTelContextDto,
|
|
70
|
+
OTelEventDto,
|
|
71
|
+
OTelExtraDto,
|
|
72
|
+
OTelLinkDto,
|
|
73
|
+
OTelSpanDto,
|
|
74
|
+
OTelSpanKind,
|
|
75
|
+
OTelSpansResponse,
|
|
76
|
+
OTelStatusCode,
|
|
42
77
|
Organization,
|
|
43
78
|
OrganizationOutput,
|
|
79
|
+
Outputs,
|
|
80
|
+
ParentDto,
|
|
81
|
+
Permission,
|
|
82
|
+
ProjectsResponse,
|
|
83
|
+
ProviderKeyDto,
|
|
84
|
+
ProviderKind,
|
|
85
|
+
ReferenceDto,
|
|
86
|
+
ReferenceRequestModel,
|
|
44
87
|
Result,
|
|
88
|
+
RootDto,
|
|
89
|
+
Score,
|
|
90
|
+
SecretDto,
|
|
91
|
+
SecretKind,
|
|
92
|
+
SecretResponseDto,
|
|
45
93
|
SimpleEvaluationOutput,
|
|
46
94
|
Span,
|
|
95
|
+
SpanDetail,
|
|
96
|
+
SpanDto,
|
|
97
|
+
SpanDtoNodesValue,
|
|
98
|
+
SpanStatusCode,
|
|
99
|
+
SpanVariant,
|
|
100
|
+
StatusCode,
|
|
101
|
+
StatusDto,
|
|
47
102
|
Template,
|
|
48
103
|
TemplateImageInfo,
|
|
49
104
|
TestSetOutputResponse,
|
|
50
105
|
TestSetSimpleResponse,
|
|
51
|
-
|
|
106
|
+
TimeDto,
|
|
107
|
+
TraceDetail,
|
|
108
|
+
TreeDto,
|
|
109
|
+
TreeType,
|
|
110
|
+
UpdateAppOutput,
|
|
52
111
|
Uri,
|
|
53
112
|
ValidationError,
|
|
54
113
|
ValidationErrorLocItem,
|
|
55
114
|
VariantAction,
|
|
56
115
|
VariantActionEnum,
|
|
116
|
+
WithPagination,
|
|
117
|
+
WorkspaceMemberResponse,
|
|
118
|
+
WorkspacePermission,
|
|
119
|
+
WorkspaceResponse,
|
|
120
|
+
WorkspaceRole,
|
|
121
|
+
WorkspaceRoleResponse,
|
|
57
122
|
)
|
|
58
123
|
from .errors import UnprocessableEntityError
|
|
124
|
+
from . import (
|
|
125
|
+
access_control,
|
|
126
|
+
apps,
|
|
127
|
+
bases,
|
|
128
|
+
configs,
|
|
129
|
+
containers,
|
|
130
|
+
environments,
|
|
131
|
+
evaluations,
|
|
132
|
+
evaluators,
|
|
133
|
+
observability,
|
|
134
|
+
observability_v_1,
|
|
135
|
+
scopes,
|
|
136
|
+
testsets,
|
|
137
|
+
variants,
|
|
138
|
+
vault,
|
|
139
|
+
)
|
|
140
|
+
from .client import AgentaApi, AsyncAgentaApi
|
|
141
|
+
from .containers import ContainerTemplatesResponse
|
|
142
|
+
from .observability_v_1 import Format, QueryAnalyticsResponse, QueryTracesResponse
|
|
143
|
+
from .variants import AddVariantFromBaseAndConfigResponse
|
|
59
144
|
|
|
60
145
|
__all__ = [
|
|
61
146
|
"AddVariantFromBaseAndConfigResponse",
|
|
147
|
+
"AgentaApi",
|
|
148
|
+
"AgentaNodeDto",
|
|
149
|
+
"AgentaNodeDtoNodesValue",
|
|
150
|
+
"AgentaNodesResponse",
|
|
151
|
+
"AgentaRootDto",
|
|
152
|
+
"AgentaRootsResponse",
|
|
153
|
+
"AgentaTreeDto",
|
|
154
|
+
"AgentaTreesResponse",
|
|
62
155
|
"AggregatedResult",
|
|
156
|
+
"AggregatedResultEvaluatorConfig",
|
|
157
|
+
"AnalyticsResponse",
|
|
63
158
|
"App",
|
|
64
|
-
"
|
|
65
|
-
"AppVariantOutputExtended",
|
|
159
|
+
"AppVariantResponse",
|
|
66
160
|
"AppVariantRevision",
|
|
161
|
+
"AsyncAgentaApi",
|
|
67
162
|
"BaseOutput",
|
|
68
163
|
"BodyImportTestset",
|
|
164
|
+
"BucketDto",
|
|
165
|
+
"CollectStatusResponse",
|
|
69
166
|
"ConfigDb",
|
|
167
|
+
"ConfigDto",
|
|
168
|
+
"ConfigResponseModel",
|
|
70
169
|
"ContainerTemplatesResponse",
|
|
170
|
+
"CorrectAnswer",
|
|
71
171
|
"CreateAppOutput",
|
|
72
|
-
"
|
|
172
|
+
"CreateSpan",
|
|
173
|
+
"CreateTraceResponse",
|
|
73
174
|
"DockerEnvVars",
|
|
74
175
|
"EnvironmentOutput",
|
|
176
|
+
"EnvironmentOutputExtended",
|
|
177
|
+
"EnvironmentRevision",
|
|
178
|
+
"Error",
|
|
75
179
|
"Evaluation",
|
|
76
180
|
"EvaluationScenario",
|
|
77
181
|
"EvaluationScenarioInput",
|
|
78
182
|
"EvaluationScenarioOutput",
|
|
79
183
|
"EvaluationScenarioResult",
|
|
184
|
+
"EvaluationScenarioScoreUpdate",
|
|
80
185
|
"EvaluationStatusEnum",
|
|
81
186
|
"EvaluationType",
|
|
82
|
-
"EvaluationWebhook",
|
|
83
187
|
"Evaluator",
|
|
84
188
|
"EvaluatorConfig",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
189
|
+
"EvaluatorMappingOutputInterface",
|
|
190
|
+
"EvaluatorOutputInterface",
|
|
191
|
+
"ExceptionDto",
|
|
192
|
+
"Format",
|
|
193
|
+
"GetConfigResponse",
|
|
194
|
+
"HeaderDto",
|
|
87
195
|
"HttpValidationError",
|
|
88
196
|
"HumanEvaluation",
|
|
89
197
|
"HumanEvaluationScenario",
|
|
90
198
|
"HumanEvaluationScenarioInput",
|
|
91
199
|
"HumanEvaluationScenarioOutput",
|
|
92
|
-
"
|
|
93
|
-
"
|
|
200
|
+
"HumanEvaluationScenarioUpdate",
|
|
201
|
+
"HumanEvaluationUpdate",
|
|
94
202
|
"Image",
|
|
95
203
|
"InviteRequest",
|
|
96
|
-
"
|
|
204
|
+
"LegacyAnalyticsResponse",
|
|
205
|
+
"LegacyDataPoint",
|
|
206
|
+
"LifecycleDto",
|
|
207
|
+
"LinkDto",
|
|
208
|
+
"ListApiKeysResponse",
|
|
97
209
|
"LlmRunRateLimit",
|
|
210
|
+
"LlmTokens",
|
|
211
|
+
"MetricsDto",
|
|
212
|
+
"NewHumanEvaluation",
|
|
98
213
|
"NewTestset",
|
|
214
|
+
"NodeDto",
|
|
215
|
+
"NodeType",
|
|
216
|
+
"OTelContextDto",
|
|
217
|
+
"OTelEventDto",
|
|
218
|
+
"OTelExtraDto",
|
|
219
|
+
"OTelLinkDto",
|
|
220
|
+
"OTelSpanDto",
|
|
221
|
+
"OTelSpanKind",
|
|
222
|
+
"OTelSpansResponse",
|
|
223
|
+
"OTelStatusCode",
|
|
99
224
|
"Organization",
|
|
100
225
|
"OrganizationOutput",
|
|
226
|
+
"Outputs",
|
|
227
|
+
"ParentDto",
|
|
228
|
+
"Permission",
|
|
229
|
+
"ProjectsResponse",
|
|
230
|
+
"ProviderKeyDto",
|
|
231
|
+
"ProviderKind",
|
|
232
|
+
"QueryAnalyticsResponse",
|
|
233
|
+
"QueryTracesResponse",
|
|
234
|
+
"ReferenceDto",
|
|
235
|
+
"ReferenceRequestModel",
|
|
101
236
|
"Result",
|
|
237
|
+
"RootDto",
|
|
238
|
+
"Score",
|
|
239
|
+
"SecretDto",
|
|
240
|
+
"SecretKind",
|
|
241
|
+
"SecretResponseDto",
|
|
102
242
|
"SimpleEvaluationOutput",
|
|
103
243
|
"Span",
|
|
244
|
+
"SpanDetail",
|
|
245
|
+
"SpanDto",
|
|
246
|
+
"SpanDtoNodesValue",
|
|
247
|
+
"SpanStatusCode",
|
|
248
|
+
"SpanVariant",
|
|
249
|
+
"StatusCode",
|
|
250
|
+
"StatusDto",
|
|
104
251
|
"Template",
|
|
105
252
|
"TemplateImageInfo",
|
|
106
253
|
"TestSetOutputResponse",
|
|
107
254
|
"TestSetSimpleResponse",
|
|
108
|
-
"
|
|
255
|
+
"TimeDto",
|
|
256
|
+
"TraceDetail",
|
|
257
|
+
"TreeDto",
|
|
258
|
+
"TreeType",
|
|
109
259
|
"UnprocessableEntityError",
|
|
260
|
+
"UpdateAppOutput",
|
|
110
261
|
"Uri",
|
|
111
262
|
"ValidationError",
|
|
112
263
|
"ValidationErrorLocItem",
|
|
113
264
|
"VariantAction",
|
|
114
265
|
"VariantActionEnum",
|
|
266
|
+
"WithPagination",
|
|
267
|
+
"WorkspaceMemberResponse",
|
|
268
|
+
"WorkspacePermission",
|
|
269
|
+
"WorkspaceResponse",
|
|
270
|
+
"WorkspaceRole",
|
|
271
|
+
"WorkspaceRoleResponse",
|
|
272
|
+
"access_control",
|
|
273
|
+
"apps",
|
|
274
|
+
"bases",
|
|
275
|
+
"configs",
|
|
276
|
+
"containers",
|
|
277
|
+
"environments",
|
|
278
|
+
"evaluations",
|
|
279
|
+
"evaluators",
|
|
280
|
+
"observability",
|
|
281
|
+
"observability_v_1",
|
|
282
|
+
"scopes",
|
|
283
|
+
"testsets",
|
|
284
|
+
"variants",
|
|
285
|
+
"vault",
|
|
115
286
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.client_wrapper import SyncClientWrapper
|
|
4
|
+
import typing
|
|
5
|
+
from ..core.request_options import RequestOptions
|
|
6
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
7
|
+
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
8
|
+
from ..types.http_validation_error import HttpValidationError
|
|
9
|
+
from json.decoder import JSONDecodeError
|
|
10
|
+
from ..core.api_error import ApiError
|
|
11
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AccessControlClient:
|
|
15
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
16
|
+
self._client_wrapper = client_wrapper
|
|
17
|
+
|
|
18
|
+
def verify_permissions(
|
|
19
|
+
self,
|
|
20
|
+
*,
|
|
21
|
+
action: typing.Optional[str] = None,
|
|
22
|
+
resource_type: typing.Optional[str] = None,
|
|
23
|
+
resource_id: typing.Optional[str] = None,
|
|
24
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
25
|
+
) -> typing.Optional[typing.Any]:
|
|
26
|
+
"""
|
|
27
|
+
Parameters
|
|
28
|
+
----------
|
|
29
|
+
action : typing.Optional[str]
|
|
30
|
+
|
|
31
|
+
resource_type : typing.Optional[str]
|
|
32
|
+
|
|
33
|
+
resource_id : typing.Optional[str]
|
|
34
|
+
|
|
35
|
+
request_options : typing.Optional[RequestOptions]
|
|
36
|
+
Request-specific configuration.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
typing.Optional[typing.Any]
|
|
41
|
+
Successful Response
|
|
42
|
+
|
|
43
|
+
Examples
|
|
44
|
+
--------
|
|
45
|
+
from agenta import AgentaApi
|
|
46
|
+
|
|
47
|
+
client = AgentaApi(
|
|
48
|
+
api_key="YOUR_API_KEY",
|
|
49
|
+
base_url="https://yourhost.com/path/to/api",
|
|
50
|
+
)
|
|
51
|
+
client.access_control.verify_permissions()
|
|
52
|
+
"""
|
|
53
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
54
|
+
"permissions/verify",
|
|
55
|
+
method="GET",
|
|
56
|
+
params={
|
|
57
|
+
"action": action,
|
|
58
|
+
"resource_type": resource_type,
|
|
59
|
+
"resource_id": resource_id,
|
|
60
|
+
},
|
|
61
|
+
request_options=request_options,
|
|
62
|
+
)
|
|
63
|
+
try:
|
|
64
|
+
if 200 <= _response.status_code < 300:
|
|
65
|
+
return typing.cast(
|
|
66
|
+
typing.Optional[typing.Any],
|
|
67
|
+
parse_obj_as(
|
|
68
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
69
|
+
object_=_response.json(),
|
|
70
|
+
),
|
|
71
|
+
)
|
|
72
|
+
if _response.status_code == 422:
|
|
73
|
+
raise UnprocessableEntityError(
|
|
74
|
+
typing.cast(
|
|
75
|
+
HttpValidationError,
|
|
76
|
+
parse_obj_as(
|
|
77
|
+
type_=HttpValidationError, # type: ignore
|
|
78
|
+
object_=_response.json(),
|
|
79
|
+
),
|
|
80
|
+
)
|
|
81
|
+
)
|
|
82
|
+
_response_json = _response.json()
|
|
83
|
+
except JSONDecodeError:
|
|
84
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
85
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class AsyncAccessControlClient:
|
|
89
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
90
|
+
self._client_wrapper = client_wrapper
|
|
91
|
+
|
|
92
|
+
async def verify_permissions(
|
|
93
|
+
self,
|
|
94
|
+
*,
|
|
95
|
+
action: typing.Optional[str] = None,
|
|
96
|
+
resource_type: typing.Optional[str] = None,
|
|
97
|
+
resource_id: typing.Optional[str] = None,
|
|
98
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
99
|
+
) -> typing.Optional[typing.Any]:
|
|
100
|
+
"""
|
|
101
|
+
Parameters
|
|
102
|
+
----------
|
|
103
|
+
action : typing.Optional[str]
|
|
104
|
+
|
|
105
|
+
resource_type : typing.Optional[str]
|
|
106
|
+
|
|
107
|
+
resource_id : typing.Optional[str]
|
|
108
|
+
|
|
109
|
+
request_options : typing.Optional[RequestOptions]
|
|
110
|
+
Request-specific configuration.
|
|
111
|
+
|
|
112
|
+
Returns
|
|
113
|
+
-------
|
|
114
|
+
typing.Optional[typing.Any]
|
|
115
|
+
Successful Response
|
|
116
|
+
|
|
117
|
+
Examples
|
|
118
|
+
--------
|
|
119
|
+
import asyncio
|
|
120
|
+
|
|
121
|
+
from agenta import AsyncAgentaApi
|
|
122
|
+
|
|
123
|
+
client = AsyncAgentaApi(
|
|
124
|
+
api_key="YOUR_API_KEY",
|
|
125
|
+
base_url="https://yourhost.com/path/to/api",
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
async def main() -> None:
|
|
130
|
+
await client.access_control.verify_permissions()
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
asyncio.run(main())
|
|
134
|
+
"""
|
|
135
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
136
|
+
"permissions/verify",
|
|
137
|
+
method="GET",
|
|
138
|
+
params={
|
|
139
|
+
"action": action,
|
|
140
|
+
"resource_type": resource_type,
|
|
141
|
+
"resource_id": resource_id,
|
|
142
|
+
},
|
|
143
|
+
request_options=request_options,
|
|
144
|
+
)
|
|
145
|
+
try:
|
|
146
|
+
if 200 <= _response.status_code < 300:
|
|
147
|
+
return typing.cast(
|
|
148
|
+
typing.Optional[typing.Any],
|
|
149
|
+
parse_obj_as(
|
|
150
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
151
|
+
object_=_response.json(),
|
|
152
|
+
),
|
|
153
|
+
)
|
|
154
|
+
if _response.status_code == 422:
|
|
155
|
+
raise UnprocessableEntityError(
|
|
156
|
+
typing.cast(
|
|
157
|
+
HttpValidationError,
|
|
158
|
+
parse_obj_as(
|
|
159
|
+
type_=HttpValidationError, # type: ignore
|
|
160
|
+
object_=_response.json(),
|
|
161
|
+
),
|
|
162
|
+
)
|
|
163
|
+
)
|
|
164
|
+
_response_json = _response.json()
|
|
165
|
+
except JSONDecodeError:
|
|
166
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
167
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|