agenta 0.36.5__py3-none-any.whl → 0.37.1__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 +1 -2
- agenta/client/__init__.py +6 -10
- agenta/client/{admin → backend/admin}/client.py +2 -0
- agenta/client/backend/api_keys/client.py +531 -0
- agenta/client/{apps → backend/apps}/client.py +0 -222
- agenta/client/{containers → backend/containers}/client.py +10 -70
- agenta/client/{core → backend/core}/http_client.py +6 -6
- agenta/client/{core → backend/core}/pydantic_utilities.py +2 -2
- agenta/client/{environments → backend/environments}/client.py +0 -2
- agenta/client/{human_evaluations → backend/human_evaluations}/client.py +0 -2
- agenta/client/{observability → backend/observability}/client.py +98 -0
- agenta/client/backend/organization/client.py +839 -0
- agenta/client/backend/testsets/__init__.py +1 -0
- agenta/client/{types → backend/types}/__init__.py +22 -6
- agenta/client/{types → backend/types}/agenta_nodes_response.py +0 -5
- agenta/client/{types → backend/types}/agenta_root_dto.py +0 -5
- agenta/client/{types → backend/types}/agenta_roots_response.py +0 -5
- agenta/client/{types → backend/types}/agenta_tree_dto.py +0 -5
- agenta/client/{types → backend/types}/agenta_trees_response.py +0 -5
- agenta/client/backend/types/custom_model_settings_dto.py +22 -0
- agenta/client/backend/types/custom_provider_dto.py +29 -0
- agenta/client/backend/types/custom_provider_kind.py +26 -0
- agenta/client/backend/types/custom_provider_settings_dto.py +24 -0
- agenta/client/backend/types/data.py +7 -0
- agenta/client/{types → backend/types}/organization.py +1 -4
- agenta/client/backend/types/organization_details.py +29 -0
- agenta/client/{types → backend/types}/organization_membership_request.py +3 -2
- agenta/client/{types → backend/types}/permission.py +1 -0
- agenta/client/backend/types/provider_key_dto.py +21 -0
- agenta/client/backend/types/provider_kind.py +21 -0
- agenta/client/backend/types/score.py +3 -0
- agenta/client/{types → backend/types}/secret_dto.py +3 -3
- agenta/client/backend/types/secret_kind.py +5 -0
- agenta/client/backend/types/standard_provider_dto.py +24 -0
- agenta/client/backend/types/standard_provider_kind.py +21 -0
- agenta/client/backend/types/standard_provider_settings_dto.py +21 -0
- agenta/client/backend/types/workspace.py +24 -0
- agenta/client/{variants → backend/variants}/client.py +18 -24
- agenta/client/backend/vault/__init__.py +1 -0
- agenta/client/{vault → backend/vault}/client.py +26 -8
- agenta/client/backend/workspace/__init__.py +1 -0
- agenta/client/backend/workspace/client.py +405 -0
- agenta/client/client.py +46 -46
- agenta/client/types/provider_key_dto.py~feat_model-registry +21 -0
- agenta/client/types/provider_kind.py~feat_model-registry +21 -0
- agenta/sdk/__init__.py +1 -1
- agenta/sdk/managers/secrets.py +175 -11
- agenta/sdk/managers/shared.py +3 -3
- agenta/sdk/middleware/vault.py +29 -37
- agenta/sdk/types.py +4 -7
- {agenta-0.36.5.dist-info → agenta-0.37.1.dist-info}/METADATA +2 -6
- agenta-0.37.1.dist-info/RECORD +255 -0
- agenta/client/types/score.py +0 -5
- agenta/client/types/secret_kind.py +0 -5
- agenta/sdk/client.py +0 -56
- agenta-0.36.5.dist-info/RECORD +0 -236
- /agenta/client/{access_control → backend/access_control}/__init__.py +0 -0
- /agenta/client/{access_control → backend/access_control}/client.py +0 -0
- /agenta/client/{admin → backend/admin}/__init__.py +0 -0
- /agenta/client/{apps → backend/api_keys}/__init__.py +0 -0
- /agenta/client/{bases → backend/apps}/__init__.py +0 -0
- /agenta/client/{configs → backend/bases}/__init__.py +0 -0
- /agenta/client/{bases → backend/bases}/client.py +0 -0
- /agenta/client/{environments → backend/configs}/__init__.py +0 -0
- /agenta/client/{configs → backend/configs}/client.py +0 -0
- /agenta/client/{containers → backend/containers}/__init__.py +0 -0
- /agenta/client/{containers → backend/containers}/types/__init__.py +0 -0
- /agenta/client/{containers → backend/containers}/types/container_templates_response.py +0 -0
- /agenta/client/{core → backend/core}/__init__.py +0 -0
- /agenta/client/{core → backend/core}/api_error.py +0 -0
- /agenta/client/{core → backend/core}/client_wrapper.py +0 -0
- /agenta/client/{core → backend/core}/datetime_utils.py +0 -0
- /agenta/client/{core → backend/core}/file.py +0 -0
- /agenta/client/{core → backend/core}/jsonable_encoder.py +0 -0
- /agenta/client/{core → backend/core}/query_encoder.py +0 -0
- /agenta/client/{core → backend/core}/remove_none_from_dict.py +0 -0
- /agenta/client/{core → backend/core}/request_options.py +0 -0
- /agenta/client/{core → backend/core}/serialization.py +0 -0
- /agenta/client/{evaluations → backend/environments}/__init__.py +0 -0
- /agenta/client/{errors → backend/errors}/__init__.py +0 -0
- /agenta/client/{errors → backend/errors}/unprocessable_entity_error.py +0 -0
- /agenta/client/{evaluators → backend/evaluations}/__init__.py +0 -0
- /agenta/client/{evaluations → backend/evaluations}/client.py +0 -0
- /agenta/client/{human_evaluations → backend/evaluators}/__init__.py +0 -0
- /agenta/client/{evaluators → backend/evaluators}/client.py +0 -0
- /agenta/client/{scopes → backend/human_evaluations}/__init__.py +0 -0
- /agenta/client/{observability → backend/observability}/__init__.py +0 -0
- /agenta/client/{observability → backend/observability}/types/__init__.py +0 -0
- /agenta/client/{observability → backend/observability}/types/format.py +0 -0
- /agenta/client/{observability → backend/observability}/types/query_analytics_response.py +0 -0
- /agenta/client/{observability → backend/observability}/types/query_traces_response.py +0 -0
- /agenta/client/{testsets → backend/organization}/__init__.py +0 -0
- /agenta/client/{vault → backend/scopes}/__init__.py +0 -0
- /agenta/client/{scopes → backend/scopes}/client.py +0 -0
- /agenta/client/{testsets → backend/testsets}/client.py +0 -0
- /agenta/client/{types → backend/types}/account_response.py +0 -0
- /agenta/client/{types → backend/types}/agenta_node_dto.py +0 -0
- /agenta/client/{types → backend/types}/agenta_node_dto_nodes_value.py +0 -0
- /agenta/client/{types → backend/types}/aggregated_result.py +0 -0
- /agenta/client/{types → backend/types}/aggregated_result_evaluator_config.py +0 -0
- /agenta/client/{types → backend/types}/analytics_response.py +0 -0
- /agenta/client/{types → backend/types}/app.py +0 -0
- /agenta/client/{types → backend/types}/app_variant_response.py +0 -0
- /agenta/client/{types → backend/types}/app_variant_revision.py +0 -0
- /agenta/client/{types → backend/types}/base_output.py +0 -0
- /agenta/client/{types → backend/types}/body_import_testset.py +0 -0
- /agenta/client/{types → backend/types}/bucket_dto.py +0 -0
- /agenta/client/{types → backend/types}/collect_status_response.py +0 -0
- /agenta/client/{types → backend/types}/config_db.py +0 -0
- /agenta/client/{types → backend/types}/config_dto.py +0 -0
- /agenta/client/{types → backend/types}/config_response_model.py +0 -0
- /agenta/client/{types → backend/types}/correct_answer.py +0 -0
- /agenta/client/{types → backend/types}/create_app_output.py +0 -0
- /agenta/client/{types → backend/types}/delete_evaluation.py +0 -0
- /agenta/client/{types → backend/types}/docker_env_vars.py +0 -0
- /agenta/client/{types → backend/types}/environment_output.py +0 -0
- /agenta/client/{types → backend/types}/environment_output_extended.py +0 -0
- /agenta/client/{types → backend/types}/environment_revision.py +0 -0
- /agenta/client/{types → backend/types}/error.py +0 -0
- /agenta/client/{types → backend/types}/evaluation.py +0 -0
- /agenta/client/{types → backend/types}/evaluation_scenario.py +0 -0
- /agenta/client/{types → backend/types}/evaluation_scenario_input.py +0 -0
- /agenta/client/{types → backend/types}/evaluation_scenario_output.py +0 -0
- /agenta/client/{types → backend/types}/evaluation_scenario_result.py +0 -0
- /agenta/client/{types → backend/types}/evaluation_status_enum.py +0 -0
- /agenta/client/{types → backend/types}/evaluation_type.py +0 -0
- /agenta/client/{types → backend/types}/evaluator.py +0 -0
- /agenta/client/{types → backend/types}/evaluator_config.py +0 -0
- /agenta/client/{types → backend/types}/evaluator_mapping_output_interface.py +0 -0
- /agenta/client/{types → backend/types}/evaluator_output_interface.py +0 -0
- /agenta/client/{types → backend/types}/exception_dto.py +0 -0
- /agenta/client/{types → backend/types}/get_config_response.py +0 -0
- /agenta/client/{types → backend/types}/header_dto.py +0 -0
- /agenta/client/{types → backend/types}/http_validation_error.py +0 -0
- /agenta/client/{types → backend/types}/human_evaluation.py +0 -0
- /agenta/client/{types → backend/types}/human_evaluation_scenario.py +0 -0
- /agenta/client/{types → backend/types}/human_evaluation_scenario_input.py +0 -0
- /agenta/client/{types → backend/types}/human_evaluation_scenario_output.py +0 -0
- /agenta/client/{types → backend/types}/image.py +0 -0
- /agenta/client/{types → backend/types}/invite_request.py +0 -0
- /agenta/client/{types → backend/types}/legacy_analytics_response.py +0 -0
- /agenta/client/{types → backend/types}/legacy_data_point.py +0 -0
- /agenta/client/{types → backend/types}/legacy_scope_request.py +0 -0
- /agenta/client/{types → backend/types}/legacy_scopes_response.py +0 -0
- /agenta/client/{types → backend/types}/legacy_user_request.py +0 -0
- /agenta/client/{types → backend/types}/legacy_user_response.py +0 -0
- /agenta/client/{types → backend/types}/lifecycle_dto.py +0 -0
- /agenta/client/{types → backend/types}/link_dto.py +0 -0
- /agenta/client/{types → backend/types}/list_api_keys_response.py +0 -0
- /agenta/client/{types → backend/types}/llm_run_rate_limit.py +0 -0
- /agenta/client/{types → backend/types}/metrics_dto.py +0 -0
- /agenta/client/{types → backend/types}/new_testset.py +0 -0
- /agenta/client/{types → backend/types}/node_dto.py +0 -0
- /agenta/client/{types → backend/types}/node_type.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_context_dto.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_event_dto.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_extra_dto.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_link_dto.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_span_dto.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_span_kind.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_spans_response.py +0 -0
- /agenta/client/{types → backend/types}/o_tel_status_code.py +0 -0
- /agenta/client/{types → backend/types}/organization_output.py +0 -0
- /agenta/client/{types → backend/types}/organization_request.py +0 -0
- /agenta/client/{types → backend/types}/parent_dto.py +0 -0
- /agenta/client/{types → backend/types}/project_membership_request.py +0 -0
- /agenta/client/{types → backend/types}/project_request.py +0 -0
- /agenta/client/{types → backend/types}/project_scope.py +0 -0
- /agenta/client/{types → backend/types}/projects_response.py +0 -0
- /agenta/client/{types → backend/types}/reference.py +0 -0
- /agenta/client/{types → backend/types}/reference_dto.py +0 -0
- /agenta/client/{types → backend/types}/reference_request_model.py +0 -0
- /agenta/client/{types → backend/types}/result.py +0 -0
- /agenta/client/{types → backend/types}/role.py +0 -0
- /agenta/client/{types → backend/types}/root_dto.py +0 -0
- /agenta/client/{types → backend/types}/scopes_response_model.py +0 -0
- /agenta/client/{types → backend/types}/secret_response_dto.py +0 -0
- /agenta/client/{types → backend/types}/simple_evaluation_output.py +0 -0
- /agenta/client/{types → backend/types}/span_dto.py +0 -0
- /agenta/client/{types → backend/types}/span_dto_nodes_value.py +0 -0
- /agenta/client/{types → backend/types}/status_code.py +0 -0
- /agenta/client/{types → backend/types}/status_dto.py +0 -0
- /agenta/client/{types → backend/types}/template.py +0 -0
- /agenta/client/{types → backend/types}/template_image_info.py +0 -0
- /agenta/client/{types → backend/types}/test_set_output_response.py +0 -0
- /agenta/client/{types → backend/types}/test_set_simple_response.py +0 -0
- /agenta/client/{types → backend/types}/time_dto.py +0 -0
- /agenta/client/{types → backend/types}/tree_dto.py +0 -0
- /agenta/client/{types → backend/types}/tree_type.py +0 -0
- /agenta/client/{types → backend/types}/update_app_output.py +0 -0
- /agenta/client/{types → backend/types}/uri.py +0 -0
- /agenta/client/{types → backend/types}/user_request.py +0 -0
- /agenta/client/{types → backend/types}/validation_error.py +0 -0
- /agenta/client/{types → backend/types}/validation_error_loc_item.py +0 -0
- /agenta/client/{types → backend/types}/variant_action.py +0 -0
- /agenta/client/{types → backend/types}/variant_action_enum.py +0 -0
- /agenta/client/{types → backend/types}/workspace_member_response.py +0 -0
- /agenta/client/{types → backend/types}/workspace_membership_request.py +0 -0
- /agenta/client/{types → backend/types}/workspace_permission.py +0 -0
- /agenta/client/{types → backend/types}/workspace_request.py +0 -0
- /agenta/client/{types → backend/types}/workspace_response.py +0 -0
- /agenta/client/{types → backend/types}/workspace_role.py +0 -0
- /agenta/client/{types → backend/types}/workspace_role_response.py +0 -0
- /agenta/client/{variants → backend/variants}/__init__.py +0 -0
- /agenta/client/{variants → backend/variants}/types/__init__.py +0 -0
- /agenta/client/{variants → backend/variants}/types/add_variant_from_base_and_config_response.py +0 -0
- /agenta/client/types/{provider_key_dto.py → provider_key_dto.py~HEAD} +0 -0
- /agenta/client/types/{provider_kind.py → provider_kind.py~HEAD} +0 -0
- {agenta-0.36.5.dist-info → agenta-0.37.1.dist-info}/WHEEL +0 -0
|
@@ -19,6 +19,51 @@ class ObservabilityClient:
|
|
|
19
19
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
20
|
self._client_wrapper = client_wrapper
|
|
21
21
|
|
|
22
|
+
def otlp_v_1_traces(
|
|
23
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
24
|
+
) -> CollectStatusResponse:
|
|
25
|
+
"""
|
|
26
|
+
Receive traces via OTLP.
|
|
27
|
+
|
|
28
|
+
Parameters
|
|
29
|
+
----------
|
|
30
|
+
request_options : typing.Optional[RequestOptions]
|
|
31
|
+
Request-specific configuration.
|
|
32
|
+
|
|
33
|
+
Returns
|
|
34
|
+
-------
|
|
35
|
+
CollectStatusResponse
|
|
36
|
+
Successful Response
|
|
37
|
+
|
|
38
|
+
Examples
|
|
39
|
+
--------
|
|
40
|
+
from agenta import AgentaApi
|
|
41
|
+
|
|
42
|
+
client = AgentaApi(
|
|
43
|
+
api_key="YOUR_API_KEY",
|
|
44
|
+
base_url="https://yourhost.com/path/to/api",
|
|
45
|
+
)
|
|
46
|
+
client.observability.otlp_v_1_traces()
|
|
47
|
+
"""
|
|
48
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
49
|
+
"otlp/v1/traces",
|
|
50
|
+
method="POST",
|
|
51
|
+
request_options=request_options,
|
|
52
|
+
)
|
|
53
|
+
try:
|
|
54
|
+
if 200 <= _response.status_code < 300:
|
|
55
|
+
return typing.cast(
|
|
56
|
+
CollectStatusResponse,
|
|
57
|
+
parse_obj_as(
|
|
58
|
+
type_=CollectStatusResponse, # type: ignore
|
|
59
|
+
object_=_response.json(),
|
|
60
|
+
),
|
|
61
|
+
)
|
|
62
|
+
_response_json = _response.json()
|
|
63
|
+
except JSONDecodeError:
|
|
64
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
65
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
66
|
+
|
|
22
67
|
def otlp_status(
|
|
23
68
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
24
69
|
) -> CollectStatusResponse:
|
|
@@ -373,6 +418,59 @@ class AsyncObservabilityClient:
|
|
|
373
418
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
374
419
|
self._client_wrapper = client_wrapper
|
|
375
420
|
|
|
421
|
+
async def otlp_v_1_traces(
|
|
422
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
423
|
+
) -> CollectStatusResponse:
|
|
424
|
+
"""
|
|
425
|
+
Receive traces via OTLP.
|
|
426
|
+
|
|
427
|
+
Parameters
|
|
428
|
+
----------
|
|
429
|
+
request_options : typing.Optional[RequestOptions]
|
|
430
|
+
Request-specific configuration.
|
|
431
|
+
|
|
432
|
+
Returns
|
|
433
|
+
-------
|
|
434
|
+
CollectStatusResponse
|
|
435
|
+
Successful Response
|
|
436
|
+
|
|
437
|
+
Examples
|
|
438
|
+
--------
|
|
439
|
+
import asyncio
|
|
440
|
+
|
|
441
|
+
from agenta import AsyncAgentaApi
|
|
442
|
+
|
|
443
|
+
client = AsyncAgentaApi(
|
|
444
|
+
api_key="YOUR_API_KEY",
|
|
445
|
+
base_url="https://yourhost.com/path/to/api",
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
async def main() -> None:
|
|
450
|
+
await client.observability.otlp_v_1_traces()
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
asyncio.run(main())
|
|
454
|
+
"""
|
|
455
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
456
|
+
"otlp/v1/traces",
|
|
457
|
+
method="POST",
|
|
458
|
+
request_options=request_options,
|
|
459
|
+
)
|
|
460
|
+
try:
|
|
461
|
+
if 200 <= _response.status_code < 300:
|
|
462
|
+
return typing.cast(
|
|
463
|
+
CollectStatusResponse,
|
|
464
|
+
parse_obj_as(
|
|
465
|
+
type_=CollectStatusResponse, # type: ignore
|
|
466
|
+
object_=_response.json(),
|
|
467
|
+
),
|
|
468
|
+
)
|
|
469
|
+
_response_json = _response.json()
|
|
470
|
+
except JSONDecodeError:
|
|
471
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
472
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
473
|
+
|
|
376
474
|
async def otlp_status(
|
|
377
475
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
378
476
|
) -> CollectStatusResponse:
|