agenta 0.48.8__py3-none-any.whl → 0.48.10__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.

Files changed (297) hide show
  1. agenta/__init__.py +3 -2
  2. agenta/client/Readme.md +258 -80
  3. agenta/client/__init__.py +205 -29
  4. agenta/client/backend/__init__.py +461 -0
  5. agenta/client/backend/access_control/__init__.py +2 -0
  6. agenta/client/backend/access_control/client.py +53 -73
  7. agenta/client/backend/access_control/raw_client.py +180 -0
  8. agenta/client/backend/admin/__init__.py +2 -0
  9. agenta/client/backend/admin/client.py +473 -268
  10. agenta/client/backend/admin/raw_client.py +1017 -0
  11. agenta/client/backend/api_keys/__init__.py +2 -0
  12. agenta/client/backend/api_keys/client.py +43 -276
  13. agenta/client/backend/api_keys/raw_client.py +364 -0
  14. agenta/client/backend/apps/__init__.py +2 -0
  15. agenta/client/backend/apps/client.py +132 -895
  16. agenta/client/backend/apps/raw_client.py +1516 -0
  17. agenta/client/backend/bases/__init__.py +2 -0
  18. agenta/client/backend/bases/client.py +33 -73
  19. agenta/client/backend/bases/raw_client.py +179 -0
  20. agenta/client/backend/billing/__init__.py +3 -0
  21. agenta/client/backend/billing/client.py +564 -0
  22. agenta/client/backend/billing/raw_client.py +805 -0
  23. agenta/client/backend/client.py +1268 -0
  24. agenta/client/backend/configs/__init__.py +2 -0
  25. agenta/client/backend/configs/client.py +49 -361
  26. agenta/client/backend/configs/raw_client.py +402 -0
  27. agenta/client/backend/containers/__init__.py +1 -3
  28. agenta/client/backend/containers/client.py +25 -548
  29. agenta/client/backend/containers/raw_client.py +112 -0
  30. agenta/client/backend/core/__init__.py +5 -0
  31. agenta/client/backend/core/api_error.py +12 -6
  32. agenta/client/backend/core/client_wrapper.py +4 -4
  33. agenta/client/backend/core/file.py +1 -3
  34. agenta/client/backend/core/force_multipart.py +16 -0
  35. agenta/client/backend/core/http_client.py +78 -34
  36. agenta/client/backend/core/http_response.py +55 -0
  37. agenta/client/backend/core/jsonable_encoder.py +0 -1
  38. agenta/client/backend/core/pydantic_utilities.py +88 -113
  39. agenta/client/backend/core/serialization.py +9 -3
  40. agenta/client/backend/environment.py +7 -0
  41. agenta/client/backend/environments/__init__.py +2 -0
  42. agenta/client/backend/environments/client.py +43 -79
  43. agenta/client/backend/environments/raw_client.py +193 -0
  44. agenta/client/backend/errors/__init__.py +2 -0
  45. agenta/client/backend/errors/unprocessable_entity_error.py +8 -2
  46. agenta/client/backend/evals/__init__.py +3 -0
  47. agenta/client/backend/evals/client.py +1042 -0
  48. agenta/client/backend/evals/raw_client.py +1549 -0
  49. agenta/client/backend/evaluations/__init__.py +2 -0
  50. agenta/client/backend/evaluations/client.py +106 -590
  51. agenta/client/backend/evaluations/raw_client.py +1344 -0
  52. agenta/client/backend/evaluators/__init__.py +2 -0
  53. agenta/client/backend/evaluators/client.py +99 -516
  54. agenta/client/backend/evaluators/raw_client.py +1182 -0
  55. agenta/client/backend/human_evaluations/__init__.py +2 -0
  56. agenta/client/backend/human_evaluations/client.py +120 -680
  57. agenta/client/backend/human_evaluations/raw_client.py +1577 -0
  58. agenta/client/backend/observability/__init__.py +14 -2
  59. agenta/client/backend/observability/client.py +185 -341
  60. agenta/client/backend/observability/raw_client.py +943 -0
  61. agenta/client/backend/observability/types/__init__.py +10 -2
  62. agenta/client/backend/observability/types/{format.py → fetch_trace_by_id_request_trace_id.py} +1 -1
  63. agenta/client/backend/observability/types/fetch_trace_by_id_response.py +15 -0
  64. agenta/client/backend/observability/types/query_analytics_response.py +2 -1
  65. agenta/client/backend/observability/types/query_traces_response.py +7 -3
  66. agenta/client/backend/organization/__init__.py +2 -0
  67. agenta/client/backend/organization/client.py +105 -361
  68. agenta/client/backend/organization/raw_client.py +774 -0
  69. agenta/client/backend/raw_client.py +1432 -0
  70. agenta/client/backend/scopes/__init__.py +2 -0
  71. agenta/client/backend/scopes/client.py +31 -45
  72. agenta/client/backend/scopes/raw_client.py +105 -0
  73. agenta/client/backend/testsets/__init__.py +14 -0
  74. agenta/client/backend/testsets/client.py +1098 -653
  75. agenta/client/backend/testsets/raw_client.py +2348 -0
  76. agenta/client/backend/testsets/types/__init__.py +17 -0
  77. agenta/client/backend/testsets/types/create_testset_from_file_request_file_type.py +7 -0
  78. agenta/client/backend/testsets/types/fetch_testset_to_file_request_file_type.py +7 -0
  79. agenta/client/backend/testsets/types/update_testset_from_file_request_file_type.py +7 -0
  80. agenta/client/backend/tracing/__init__.py +7 -0
  81. agenta/client/backend/tracing/client.py +782 -0
  82. agenta/client/backend/tracing/raw_client.py +1223 -0
  83. agenta/client/backend/tracing/types/__init__.py +8 -0
  84. agenta/client/backend/{types/variant_action_enum.py → tracing/types/fetch_trace_request_trace_id.py} +1 -1
  85. agenta/client/backend/tracing/types/remove_trace_request_trace_id.py +5 -0
  86. agenta/client/backend/types/__init__.py +153 -26
  87. agenta/client/backend/types/account_request.py +24 -0
  88. agenta/client/backend/types/account_response.py +5 -7
  89. agenta/client/backend/types/agenta_node_dto.py +13 -13
  90. agenta/client/backend/types/agenta_node_dto_nodes_value.py +1 -0
  91. agenta/client/backend/types/agenta_nodes_response.py +14 -8
  92. agenta/client/backend/types/agenta_root_dto.py +16 -8
  93. agenta/client/backend/types/agenta_roots_response.py +16 -8
  94. agenta/client/backend/types/agenta_tree_dto.py +16 -8
  95. agenta/client/backend/types/agenta_trees_response.py +16 -8
  96. agenta/client/backend/types/aggregated_result.py +5 -7
  97. agenta/client/backend/types/aggregated_result_evaluator_config.py +1 -0
  98. agenta/client/backend/types/analytics_response.py +4 -6
  99. agenta/client/backend/types/annotation.py +50 -0
  100. agenta/client/backend/types/annotation_create.py +39 -0
  101. agenta/client/backend/types/annotation_edit.py +31 -0
  102. agenta/client/backend/types/annotation_kind.py +5 -0
  103. agenta/client/backend/types/{uri.py → annotation_link.py} +6 -7
  104. agenta/client/backend/types/{provider_key_dto.py → annotation_link_response.py} +6 -7
  105. agenta/client/backend/types/annotation_query.py +40 -0
  106. agenta/client/backend/types/annotation_query_request.py +20 -0
  107. agenta/client/backend/types/annotation_reference.py +21 -0
  108. agenta/client/backend/types/annotation_references.py +22 -0
  109. agenta/client/backend/types/{docker_env_vars.py → annotation_response.py} +6 -7
  110. agenta/client/backend/types/annotation_source.py +5 -0
  111. agenta/client/backend/types/annotations_response.py +24 -0
  112. agenta/client/backend/types/app.py +3 -5
  113. agenta/client/backend/types/app_variant_response.py +3 -6
  114. agenta/client/backend/types/app_variant_revision.py +5 -6
  115. agenta/client/backend/types/artifact.py +44 -0
  116. agenta/client/backend/types/base_output.py +3 -5
  117. agenta/client/backend/types/body_fetch_workflow_revision.py +21 -0
  118. agenta/client/backend/types/body_import_testset.py +3 -5
  119. agenta/client/backend/types/bucket_dto.py +4 -6
  120. agenta/client/backend/types/collect_status_response.py +3 -5
  121. agenta/client/backend/types/config_db.py +3 -5
  122. agenta/client/backend/types/config_dto.py +5 -7
  123. agenta/client/backend/types/config_response_model.py +5 -7
  124. agenta/client/backend/types/correct_answer.py +3 -5
  125. agenta/client/backend/types/create_app_output.py +3 -5
  126. agenta/client/backend/types/custom_model_settings_dto.py +3 -5
  127. agenta/client/backend/types/custom_provider_dto.py +6 -9
  128. agenta/client/backend/types/custom_provider_kind.py +5 -5
  129. agenta/client/backend/types/custom_provider_settings_dto.py +3 -5
  130. agenta/client/backend/types/data.py +2 -1
  131. agenta/client/backend/types/delete_evaluation.py +3 -5
  132. agenta/client/backend/types/environment_output.py +3 -5
  133. agenta/client/backend/types/environment_output_extended.py +4 -6
  134. agenta/client/backend/types/environment_revision.py +5 -5
  135. agenta/client/backend/types/error.py +3 -5
  136. agenta/client/backend/types/evaluation.py +6 -8
  137. agenta/client/backend/types/evaluation_scenario.py +5 -7
  138. agenta/client/backend/types/evaluation_scenario_input.py +3 -5
  139. agenta/client/backend/types/evaluation_scenario_output.py +4 -6
  140. agenta/client/backend/types/evaluation_scenario_result.py +4 -6
  141. agenta/client/backend/types/evaluator.py +31 -12
  142. agenta/client/backend/types/evaluator_config.py +3 -5
  143. agenta/client/backend/types/evaluator_flags.py +21 -0
  144. agenta/client/backend/types/evaluator_mapping_output_interface.py +3 -5
  145. agenta/client/backend/types/evaluator_output_interface.py +3 -5
  146. agenta/client/backend/types/evaluator_query.py +32 -0
  147. agenta/client/backend/types/evaluator_query_request.py +30 -0
  148. agenta/client/backend/types/evaluator_request.py +20 -0
  149. agenta/client/backend/types/evaluator_response.py +21 -0
  150. agenta/client/backend/types/evaluators_response.py +21 -0
  151. agenta/client/backend/types/exception_dto.py +3 -5
  152. agenta/client/backend/types/{o_tel_spans_response.py → extended_o_tel_tracing_response.py} +5 -7
  153. agenta/client/backend/types/focus.py +5 -0
  154. agenta/client/backend/types/format.py +5 -0
  155. agenta/client/backend/types/full_json_input.py +34 -0
  156. agenta/client/backend/types/full_json_output.py +29 -0
  157. agenta/client/backend/types/get_config_response.py +3 -5
  158. agenta/client/backend/types/{header_dto.py → header.py} +4 -6
  159. agenta/client/backend/types/http_validation_error.py +4 -6
  160. agenta/client/backend/types/human_evaluation.py +3 -5
  161. agenta/client/backend/types/human_evaluation_scenario.py +4 -6
  162. agenta/client/backend/types/human_evaluation_scenario_input.py +3 -5
  163. agenta/client/backend/types/human_evaluation_scenario_output.py +3 -5
  164. agenta/client/backend/types/invite_request.py +4 -6
  165. agenta/client/backend/types/legacy_analytics_response.py +4 -6
  166. agenta/client/backend/types/legacy_data_point.py +3 -5
  167. agenta/client/backend/types/legacy_evaluator.py +26 -0
  168. agenta/client/backend/types/legacy_scope_request.py +4 -6
  169. agenta/client/backend/types/legacy_scopes_response.py +3 -5
  170. agenta/client/backend/types/legacy_subscription_request.py +19 -0
  171. agenta/client/backend/types/legacy_user_request.py +5 -7
  172. agenta/client/backend/types/legacy_user_response.py +3 -5
  173. agenta/client/backend/types/lifecycle_dto.py +3 -5
  174. agenta/client/backend/types/link_dto.py +4 -6
  175. agenta/client/backend/types/list_api_keys_response.py +3 -5
  176. agenta/client/backend/types/llm_run_rate_limit.py +3 -5
  177. agenta/client/backend/types/meta_request.py +30 -0
  178. agenta/client/backend/types/metrics_dto.py +3 -5
  179. agenta/client/backend/types/new_testset.py +3 -5
  180. agenta/client/backend/types/node_dto.py +4 -6
  181. agenta/client/backend/types/o_tel_context_dto.py +3 -5
  182. agenta/client/backend/types/o_tel_event.py +35 -0
  183. agenta/client/backend/types/o_tel_event_dto.py +3 -5
  184. agenta/client/backend/types/o_tel_extra_dto.py +4 -6
  185. agenta/client/backend/types/o_tel_flat_span.py +56 -0
  186. agenta/client/backend/types/o_tel_flat_span_input_end_time.py +6 -0
  187. agenta/client/backend/types/o_tel_flat_span_input_start_time.py +6 -0
  188. agenta/client/backend/types/o_tel_flat_span_output_end_time.py +6 -0
  189. agenta/client/backend/types/o_tel_flat_span_output_start_time.py +6 -0
  190. agenta/client/backend/types/o_tel_link.py +34 -0
  191. agenta/client/backend/types/o_tel_link_dto.py +4 -6
  192. agenta/client/backend/types/o_tel_links_response.py +22 -0
  193. agenta/client/backend/types/o_tel_span.py +58 -0
  194. agenta/client/backend/types/o_tel_span_dto.py +8 -10
  195. agenta/client/backend/types/o_tel_span_input_end_time.py +6 -0
  196. agenta/client/backend/types/o_tel_span_input_spans_value.py +7 -0
  197. agenta/client/backend/types/o_tel_span_input_start_time.py +6 -0
  198. agenta/client/backend/types/o_tel_span_output_end_time.py +6 -0
  199. agenta/client/backend/types/o_tel_span_output_spans_value.py +30 -0
  200. agenta/client/backend/types/o_tel_span_output_start_time.py +6 -0
  201. agenta/client/backend/types/o_tel_spans_tree.py +22 -0
  202. agenta/client/backend/types/o_tel_spans_tree_input_spans_value.py +7 -0
  203. agenta/client/backend/types/o_tel_spans_tree_output_spans_value.py +5 -0
  204. agenta/client/backend/types/o_tel_status_code.py +1 -1
  205. agenta/client/backend/types/o_tel_tracing_data_response.py +22 -0
  206. agenta/client/backend/types/o_tel_tracing_request.py +22 -0
  207. agenta/client/backend/types/o_tel_tracing_response.py +27 -0
  208. agenta/client/backend/types/organization.py +3 -5
  209. agenta/client/backend/types/organization_details.py +3 -5
  210. agenta/client/backend/types/organization_membership_request.py +5 -7
  211. agenta/client/backend/types/organization_output.py +3 -5
  212. agenta/client/backend/types/organization_request.py +3 -5
  213. agenta/client/backend/types/parent_dto.py +3 -5
  214. agenta/client/backend/types/permission.py +11 -0
  215. agenta/client/backend/types/plan.py +14 -0
  216. agenta/client/backend/types/project_membership_request.py +5 -7
  217. agenta/client/backend/types/project_request.py +4 -6
  218. agenta/client/backend/types/project_scope.py +5 -7
  219. agenta/client/backend/types/projects_response.py +3 -5
  220. agenta/client/backend/types/recursive_types.py +23 -0
  221. agenta/client/backend/types/reference.py +18 -5
  222. agenta/client/backend/types/reference_dto.py +4 -5
  223. agenta/client/backend/types/reference_request_model.py +4 -5
  224. agenta/client/backend/types/result.py +4 -6
  225. agenta/client/backend/types/root_dto.py +3 -5
  226. agenta/client/backend/types/scopes_response_model.py +4 -6
  227. agenta/client/backend/types/secret_dto.py +5 -7
  228. agenta/client/backend/types/secret_response_dto.py +11 -11
  229. agenta/client/backend/types/simple_evaluation_output.py +4 -6
  230. agenta/client/backend/types/span_dto.py +18 -14
  231. agenta/client/backend/types/span_dto_nodes_value.py +1 -1
  232. agenta/client/backend/types/standard_provider_dto.py +5 -7
  233. agenta/client/backend/types/standard_provider_settings_dto.py +3 -5
  234. agenta/client/backend/types/status_dto.py +4 -6
  235. agenta/client/backend/types/tags_request.py +30 -0
  236. agenta/client/backend/types/test_set_output_response.py +5 -7
  237. agenta/client/backend/types/test_set_simple_response.py +3 -5
  238. agenta/client/backend/types/testcase_response.py +33 -0
  239. agenta/client/backend/types/testset.py +46 -0
  240. agenta/client/backend/types/testset_request.py +20 -0
  241. agenta/client/backend/types/testset_response.py +21 -0
  242. agenta/client/backend/types/testsets_response.py +21 -0
  243. agenta/client/backend/types/time_dto.py +3 -5
  244. agenta/client/backend/types/timestamp.py +6 -0
  245. agenta/client/backend/types/tree_dto.py +4 -6
  246. agenta/client/backend/types/update_app_output.py +3 -5
  247. agenta/client/backend/types/user_request.py +3 -5
  248. agenta/client/backend/types/validation_error.py +4 -6
  249. agenta/client/backend/types/workflow_artifact.py +45 -0
  250. agenta/client/backend/types/workflow_data.py +20 -0
  251. agenta/client/backend/types/workflow_flags.py +21 -0
  252. agenta/client/backend/types/workflow_request.py +20 -0
  253. agenta/client/backend/types/workflow_response.py +21 -0
  254. agenta/client/backend/types/workflow_revision.py +57 -0
  255. agenta/client/backend/types/workflow_revision_request.py +20 -0
  256. agenta/client/backend/types/workflow_revision_response.py +21 -0
  257. agenta/client/backend/types/workflow_revisions_response.py +21 -0
  258. agenta/client/backend/types/workflow_variant.py +48 -0
  259. agenta/client/backend/types/workflow_variant_request.py +20 -0
  260. agenta/client/backend/types/workflow_variant_response.py +21 -0
  261. agenta/client/backend/types/workflow_variants_response.py +21 -0
  262. agenta/client/backend/types/workflows_response.py +21 -0
  263. agenta/client/backend/types/workspace.py +3 -5
  264. agenta/client/backend/types/workspace_member_response.py +4 -6
  265. agenta/client/backend/types/workspace_membership_request.py +5 -7
  266. agenta/client/backend/types/workspace_permission.py +5 -7
  267. agenta/client/backend/types/workspace_request.py +4 -6
  268. agenta/client/backend/types/workspace_response.py +4 -6
  269. agenta/client/backend/variants/__init__.py +2 -0
  270. agenta/client/backend/variants/client.py +306 -1651
  271. agenta/client/backend/variants/raw_client.py +2482 -0
  272. agenta/client/backend/variants/types/__init__.py +2 -0
  273. agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py +1 -0
  274. agenta/client/backend/vault/__init__.py +2 -0
  275. agenta/client/backend/vault/client.py +69 -323
  276. agenta/client/backend/vault/raw_client.py +616 -0
  277. agenta/client/backend/workflows/__init__.py +3 -0
  278. agenta/client/backend/workflows/client.py +2398 -0
  279. agenta/client/backend/workflows/raw_client.py +3639 -0
  280. agenta/client/backend/workspace/__init__.py +2 -0
  281. agenta/client/backend/workspace/client.py +46 -147
  282. agenta/client/backend/workspace/raw_client.py +376 -0
  283. agenta/client/types.py +4 -0
  284. agenta/sdk/decorators/tracing.py +2 -4
  285. agenta/sdk/tracing/processors.py +26 -39
  286. agenta/sdk/types.py +28 -1
  287. {agenta-0.48.8.dist-info → agenta-0.48.10.dist-info}/METADATA +1 -1
  288. agenta-0.48.10.dist-info/RECORD +362 -0
  289. agenta/client/backend/containers/types/__init__.py +0 -5
  290. agenta/client/backend/containers/types/container_templates_response.py +0 -6
  291. agenta/client/backend/types/image.py +0 -25
  292. agenta/client/backend/types/provider_kind.py +0 -21
  293. agenta/client/backend/types/template.py +0 -23
  294. agenta/client/backend/types/template_image_info.py +0 -29
  295. agenta/client/backend/types/variant_action.py +0 -22
  296. agenta-0.48.8.dist-info/RECORD +0 -255
  297. {agenta-0.48.8.dist-info → agenta-0.48.10.dist-info}/WHEEL +0 -0
@@ -0,0 +1,1042 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.request_options import RequestOptions
7
+ from ..types.annotation_create import AnnotationCreate
8
+ from ..types.annotation_edit import AnnotationEdit
9
+ from ..types.annotation_link_response import AnnotationLinkResponse
10
+ from ..types.annotation_query_request import AnnotationQueryRequest
11
+ from ..types.annotation_response import AnnotationResponse
12
+ from ..types.annotations_response import AnnotationsResponse
13
+ from ..types.evaluator import Evaluator
14
+ from ..types.evaluator_query_request import EvaluatorQueryRequest
15
+ from ..types.evaluator_response import EvaluatorResponse
16
+ from ..types.evaluators_response import EvaluatorsResponse
17
+ from .raw_client import AsyncRawEvalsClient, RawEvalsClient
18
+
19
+ # this is used as the default value for optional parameters
20
+ OMIT = typing.cast(typing.Any, ...)
21
+
22
+
23
+ class EvalsClient:
24
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
25
+ self._raw_client = RawEvalsClient(client_wrapper=client_wrapper)
26
+
27
+ @property
28
+ def with_raw_response(self) -> RawEvalsClient:
29
+ """
30
+ Retrieves a raw implementation of this client that returns raw responses.
31
+
32
+ Returns
33
+ -------
34
+ RawEvalsClient
35
+ """
36
+ return self._raw_client
37
+
38
+ def list_evaluators(
39
+ self, *, request_options: typing.Optional[RequestOptions] = None
40
+ ) -> EvaluatorsResponse:
41
+ """
42
+ Parameters
43
+ ----------
44
+ request_options : typing.Optional[RequestOptions]
45
+ Request-specific configuration.
46
+
47
+ Returns
48
+ -------
49
+ EvaluatorsResponse
50
+ Successful Response
51
+
52
+ Examples
53
+ --------
54
+ from agenta import AgentaApi
55
+
56
+ client = AgentaApi(
57
+ api_key="YOUR_API_KEY",
58
+ )
59
+ client.evals.list_evaluators()
60
+ """
61
+ _response = self._raw_client.list_evaluators(request_options=request_options)
62
+ return _response.data
63
+
64
+ def create_evaluator(
65
+ self,
66
+ *,
67
+ evaluator: Evaluator,
68
+ request_options: typing.Optional[RequestOptions] = None,
69
+ ) -> EvaluatorResponse:
70
+ """
71
+ Parameters
72
+ ----------
73
+ evaluator : Evaluator
74
+
75
+ request_options : typing.Optional[RequestOptions]
76
+ Request-specific configuration.
77
+
78
+ Returns
79
+ -------
80
+ EvaluatorResponse
81
+ Successful Response
82
+
83
+ Examples
84
+ --------
85
+ from agenta import AgentaApi, Evaluator
86
+
87
+ client = AgentaApi(
88
+ api_key="YOUR_API_KEY",
89
+ )
90
+ client.evals.create_evaluator(
91
+ evaluator=Evaluator(),
92
+ )
93
+ """
94
+ _response = self._raw_client.create_evaluator(
95
+ evaluator=evaluator, request_options=request_options
96
+ )
97
+ return _response.data
98
+
99
+ def fetch_evaluator(
100
+ self,
101
+ evaluator_id: str,
102
+ *,
103
+ request_options: typing.Optional[RequestOptions] = None,
104
+ ) -> EvaluatorResponse:
105
+ """
106
+ Parameters
107
+ ----------
108
+ evaluator_id : str
109
+
110
+ request_options : typing.Optional[RequestOptions]
111
+ Request-specific configuration.
112
+
113
+ Returns
114
+ -------
115
+ EvaluatorResponse
116
+ Successful Response
117
+
118
+ Examples
119
+ --------
120
+ from agenta import AgentaApi
121
+
122
+ client = AgentaApi(
123
+ api_key="YOUR_API_KEY",
124
+ )
125
+ client.evals.fetch_evaluator(
126
+ evaluator_id="evaluator_id",
127
+ )
128
+ """
129
+ _response = self._raw_client.fetch_evaluator(
130
+ evaluator_id, request_options=request_options
131
+ )
132
+ return _response.data
133
+
134
+ def edit_evaluator(
135
+ self,
136
+ evaluator_id: str,
137
+ *,
138
+ evaluator: Evaluator,
139
+ request_options: typing.Optional[RequestOptions] = None,
140
+ ) -> EvaluatorResponse:
141
+ """
142
+ Parameters
143
+ ----------
144
+ evaluator_id : str
145
+
146
+ evaluator : Evaluator
147
+
148
+ request_options : typing.Optional[RequestOptions]
149
+ Request-specific configuration.
150
+
151
+ Returns
152
+ -------
153
+ EvaluatorResponse
154
+ Successful Response
155
+
156
+ Examples
157
+ --------
158
+ from agenta import AgentaApi, Evaluator
159
+
160
+ client = AgentaApi(
161
+ api_key="YOUR_API_KEY",
162
+ )
163
+ client.evals.edit_evaluator(
164
+ evaluator_id="evaluator_id",
165
+ evaluator=Evaluator(),
166
+ )
167
+ """
168
+ _response = self._raw_client.edit_evaluator(
169
+ evaluator_id, evaluator=evaluator, request_options=request_options
170
+ )
171
+ return _response.data
172
+
173
+ def archive_evaluator(
174
+ self,
175
+ evaluator_id: str,
176
+ *,
177
+ request_options: typing.Optional[RequestOptions] = None,
178
+ ) -> EvaluatorResponse:
179
+ """
180
+ Parameters
181
+ ----------
182
+ evaluator_id : str
183
+
184
+ request_options : typing.Optional[RequestOptions]
185
+ Request-specific configuration.
186
+
187
+ Returns
188
+ -------
189
+ EvaluatorResponse
190
+ Successful Response
191
+
192
+ Examples
193
+ --------
194
+ from agenta import AgentaApi
195
+
196
+ client = AgentaApi(
197
+ api_key="YOUR_API_KEY",
198
+ )
199
+ client.evals.archive_evaluator(
200
+ evaluator_id="evaluator_id",
201
+ )
202
+ """
203
+ _response = self._raw_client.archive_evaluator(
204
+ evaluator_id, request_options=request_options
205
+ )
206
+ return _response.data
207
+
208
+ def unarchive_evaluator(
209
+ self,
210
+ evaluator_id: str,
211
+ *,
212
+ request_options: typing.Optional[RequestOptions] = None,
213
+ ) -> EvaluatorResponse:
214
+ """
215
+ Parameters
216
+ ----------
217
+ evaluator_id : str
218
+
219
+ request_options : typing.Optional[RequestOptions]
220
+ Request-specific configuration.
221
+
222
+ Returns
223
+ -------
224
+ EvaluatorResponse
225
+ Successful Response
226
+
227
+ Examples
228
+ --------
229
+ from agenta import AgentaApi
230
+
231
+ client = AgentaApi(
232
+ api_key="YOUR_API_KEY",
233
+ )
234
+ client.evals.unarchive_evaluator(
235
+ evaluator_id="evaluator_id",
236
+ )
237
+ """
238
+ _response = self._raw_client.unarchive_evaluator(
239
+ evaluator_id, request_options=request_options
240
+ )
241
+ return _response.data
242
+
243
+ def query_evaluators(
244
+ self,
245
+ *,
246
+ request: typing.Optional[EvaluatorQueryRequest] = None,
247
+ request_options: typing.Optional[RequestOptions] = None,
248
+ ) -> EvaluatorsResponse:
249
+ """
250
+ Parameters
251
+ ----------
252
+ request : typing.Optional[EvaluatorQueryRequest]
253
+
254
+ request_options : typing.Optional[RequestOptions]
255
+ Request-specific configuration.
256
+
257
+ Returns
258
+ -------
259
+ EvaluatorsResponse
260
+ Successful Response
261
+
262
+ Examples
263
+ --------
264
+ from agenta import AgentaApi
265
+
266
+ client = AgentaApi(
267
+ api_key="YOUR_API_KEY",
268
+ )
269
+ client.evals.query_evaluators()
270
+ """
271
+ _response = self._raw_client.query_evaluators(
272
+ request=request, request_options=request_options
273
+ )
274
+ return _response.data
275
+
276
+ def query_annotations(
277
+ self,
278
+ *,
279
+ request: typing.Optional[AnnotationQueryRequest] = None,
280
+ request_options: typing.Optional[RequestOptions] = None,
281
+ ) -> AnnotationsResponse:
282
+ """
283
+ Parameters
284
+ ----------
285
+ request : typing.Optional[AnnotationQueryRequest]
286
+
287
+ request_options : typing.Optional[RequestOptions]
288
+ Request-specific configuration.
289
+
290
+ Returns
291
+ -------
292
+ AnnotationsResponse
293
+ Successful Response
294
+
295
+ Examples
296
+ --------
297
+ from agenta import AgentaApi
298
+
299
+ client = AgentaApi(
300
+ api_key="YOUR_API_KEY",
301
+ )
302
+ client.evals.query_annotations()
303
+ """
304
+ _response = self._raw_client.query_annotations(
305
+ request=request, request_options=request_options
306
+ )
307
+ return _response.data
308
+
309
+ def create_annotation(
310
+ self,
311
+ *,
312
+ annotation: AnnotationCreate,
313
+ request_options: typing.Optional[RequestOptions] = None,
314
+ ) -> AnnotationResponse:
315
+ """
316
+ Parameters
317
+ ----------
318
+ annotation : AnnotationCreate
319
+
320
+ request_options : typing.Optional[RequestOptions]
321
+ Request-specific configuration.
322
+
323
+ Returns
324
+ -------
325
+ AnnotationResponse
326
+ Successful Response
327
+
328
+ Examples
329
+ --------
330
+ from agenta import (
331
+ AgentaApi,
332
+ AnnotationCreate,
333
+ AnnotationLink,
334
+ AnnotationReference,
335
+ AnnotationReferences,
336
+ )
337
+
338
+ client = AgentaApi(
339
+ api_key="YOUR_API_KEY",
340
+ )
341
+ client.evals.create_annotation(
342
+ annotation=AnnotationCreate(
343
+ data={},
344
+ references=AnnotationReferences(
345
+ evaluator=AnnotationReference(),
346
+ ),
347
+ links={
348
+ "key": AnnotationLink(
349
+ span_id="span_id",
350
+ trace_id="trace_id",
351
+ )
352
+ },
353
+ ),
354
+ )
355
+ """
356
+ _response = self._raw_client.create_annotation(
357
+ annotation=annotation, request_options=request_options
358
+ )
359
+ return _response.data
360
+
361
+ def fetch_annotation(
362
+ self,
363
+ trace_id: str,
364
+ span_id: str,
365
+ *,
366
+ request_options: typing.Optional[RequestOptions] = None,
367
+ ) -> AnnotationResponse:
368
+ """
369
+ Parameters
370
+ ----------
371
+ trace_id : str
372
+
373
+ span_id : str
374
+
375
+ request_options : typing.Optional[RequestOptions]
376
+ Request-specific configuration.
377
+
378
+ Returns
379
+ -------
380
+ AnnotationResponse
381
+ Successful Response
382
+
383
+ Examples
384
+ --------
385
+ from agenta import AgentaApi
386
+
387
+ client = AgentaApi(
388
+ api_key="YOUR_API_KEY",
389
+ )
390
+ client.evals.fetch_annotation(
391
+ trace_id="trace_id",
392
+ span_id="span_id",
393
+ )
394
+ """
395
+ _response = self._raw_client.fetch_annotation(
396
+ trace_id, span_id, request_options=request_options
397
+ )
398
+ return _response.data
399
+
400
+ def delete_annotation(
401
+ self,
402
+ trace_id: str,
403
+ span_id: str,
404
+ *,
405
+ request_options: typing.Optional[RequestOptions] = None,
406
+ ) -> AnnotationLinkResponse:
407
+ """
408
+ Parameters
409
+ ----------
410
+ trace_id : str
411
+
412
+ span_id : str
413
+
414
+ request_options : typing.Optional[RequestOptions]
415
+ Request-specific configuration.
416
+
417
+ Returns
418
+ -------
419
+ AnnotationLinkResponse
420
+ Successful Response
421
+
422
+ Examples
423
+ --------
424
+ from agenta import AgentaApi
425
+
426
+ client = AgentaApi(
427
+ api_key="YOUR_API_KEY",
428
+ )
429
+ client.evals.delete_annotation(
430
+ trace_id="trace_id",
431
+ span_id="span_id",
432
+ )
433
+ """
434
+ _response = self._raw_client.delete_annotation(
435
+ trace_id, span_id, request_options=request_options
436
+ )
437
+ return _response.data
438
+
439
+ def edit_annotation(
440
+ self,
441
+ trace_id: str,
442
+ span_id: str,
443
+ *,
444
+ annotation: AnnotationEdit,
445
+ request_options: typing.Optional[RequestOptions] = None,
446
+ ) -> AnnotationResponse:
447
+ """
448
+ Parameters
449
+ ----------
450
+ trace_id : str
451
+
452
+ span_id : str
453
+
454
+ annotation : AnnotationEdit
455
+
456
+ request_options : typing.Optional[RequestOptions]
457
+ Request-specific configuration.
458
+
459
+ Returns
460
+ -------
461
+ AnnotationResponse
462
+ Successful Response
463
+
464
+ Examples
465
+ --------
466
+ from agenta import AgentaApi, AnnotationEdit
467
+
468
+ client = AgentaApi(
469
+ api_key="YOUR_API_KEY",
470
+ )
471
+ client.evals.edit_annotation(
472
+ trace_id="trace_id",
473
+ span_id="span_id",
474
+ annotation=AnnotationEdit(
475
+ data={},
476
+ ),
477
+ )
478
+ """
479
+ _response = self._raw_client.edit_annotation(
480
+ trace_id, span_id, annotation=annotation, request_options=request_options
481
+ )
482
+ return _response.data
483
+
484
+
485
+ class AsyncEvalsClient:
486
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
487
+ self._raw_client = AsyncRawEvalsClient(client_wrapper=client_wrapper)
488
+
489
+ @property
490
+ def with_raw_response(self) -> AsyncRawEvalsClient:
491
+ """
492
+ Retrieves a raw implementation of this client that returns raw responses.
493
+
494
+ Returns
495
+ -------
496
+ AsyncRawEvalsClient
497
+ """
498
+ return self._raw_client
499
+
500
+ async def list_evaluators(
501
+ self, *, request_options: typing.Optional[RequestOptions] = None
502
+ ) -> EvaluatorsResponse:
503
+ """
504
+ Parameters
505
+ ----------
506
+ request_options : typing.Optional[RequestOptions]
507
+ Request-specific configuration.
508
+
509
+ Returns
510
+ -------
511
+ EvaluatorsResponse
512
+ Successful Response
513
+
514
+ Examples
515
+ --------
516
+ import asyncio
517
+
518
+ from agenta import AsyncAgentaApi
519
+
520
+ client = AsyncAgentaApi(
521
+ api_key="YOUR_API_KEY",
522
+ )
523
+
524
+
525
+ async def main() -> None:
526
+ await client.evals.list_evaluators()
527
+
528
+
529
+ asyncio.run(main())
530
+ """
531
+ _response = await self._raw_client.list_evaluators(
532
+ request_options=request_options
533
+ )
534
+ return _response.data
535
+
536
+ async def create_evaluator(
537
+ self,
538
+ *,
539
+ evaluator: Evaluator,
540
+ request_options: typing.Optional[RequestOptions] = None,
541
+ ) -> EvaluatorResponse:
542
+ """
543
+ Parameters
544
+ ----------
545
+ evaluator : Evaluator
546
+
547
+ request_options : typing.Optional[RequestOptions]
548
+ Request-specific configuration.
549
+
550
+ Returns
551
+ -------
552
+ EvaluatorResponse
553
+ Successful Response
554
+
555
+ Examples
556
+ --------
557
+ import asyncio
558
+
559
+ from agenta import AsyncAgentaApi, Evaluator
560
+
561
+ client = AsyncAgentaApi(
562
+ api_key="YOUR_API_KEY",
563
+ )
564
+
565
+
566
+ async def main() -> None:
567
+ await client.evals.create_evaluator(
568
+ evaluator=Evaluator(),
569
+ )
570
+
571
+
572
+ asyncio.run(main())
573
+ """
574
+ _response = await self._raw_client.create_evaluator(
575
+ evaluator=evaluator, request_options=request_options
576
+ )
577
+ return _response.data
578
+
579
+ async def fetch_evaluator(
580
+ self,
581
+ evaluator_id: str,
582
+ *,
583
+ request_options: typing.Optional[RequestOptions] = None,
584
+ ) -> EvaluatorResponse:
585
+ """
586
+ Parameters
587
+ ----------
588
+ evaluator_id : str
589
+
590
+ request_options : typing.Optional[RequestOptions]
591
+ Request-specific configuration.
592
+
593
+ Returns
594
+ -------
595
+ EvaluatorResponse
596
+ Successful Response
597
+
598
+ Examples
599
+ --------
600
+ import asyncio
601
+
602
+ from agenta import AsyncAgentaApi
603
+
604
+ client = AsyncAgentaApi(
605
+ api_key="YOUR_API_KEY",
606
+ )
607
+
608
+
609
+ async def main() -> None:
610
+ await client.evals.fetch_evaluator(
611
+ evaluator_id="evaluator_id",
612
+ )
613
+
614
+
615
+ asyncio.run(main())
616
+ """
617
+ _response = await self._raw_client.fetch_evaluator(
618
+ evaluator_id, request_options=request_options
619
+ )
620
+ return _response.data
621
+
622
+ async def edit_evaluator(
623
+ self,
624
+ evaluator_id: str,
625
+ *,
626
+ evaluator: Evaluator,
627
+ request_options: typing.Optional[RequestOptions] = None,
628
+ ) -> EvaluatorResponse:
629
+ """
630
+ Parameters
631
+ ----------
632
+ evaluator_id : str
633
+
634
+ evaluator : Evaluator
635
+
636
+ request_options : typing.Optional[RequestOptions]
637
+ Request-specific configuration.
638
+
639
+ Returns
640
+ -------
641
+ EvaluatorResponse
642
+ Successful Response
643
+
644
+ Examples
645
+ --------
646
+ import asyncio
647
+
648
+ from agenta import AsyncAgentaApi, Evaluator
649
+
650
+ client = AsyncAgentaApi(
651
+ api_key="YOUR_API_KEY",
652
+ )
653
+
654
+
655
+ async def main() -> None:
656
+ await client.evals.edit_evaluator(
657
+ evaluator_id="evaluator_id",
658
+ evaluator=Evaluator(),
659
+ )
660
+
661
+
662
+ asyncio.run(main())
663
+ """
664
+ _response = await self._raw_client.edit_evaluator(
665
+ evaluator_id, evaluator=evaluator, request_options=request_options
666
+ )
667
+ return _response.data
668
+
669
+ async def archive_evaluator(
670
+ self,
671
+ evaluator_id: str,
672
+ *,
673
+ request_options: typing.Optional[RequestOptions] = None,
674
+ ) -> EvaluatorResponse:
675
+ """
676
+ Parameters
677
+ ----------
678
+ evaluator_id : str
679
+
680
+ request_options : typing.Optional[RequestOptions]
681
+ Request-specific configuration.
682
+
683
+ Returns
684
+ -------
685
+ EvaluatorResponse
686
+ Successful Response
687
+
688
+ Examples
689
+ --------
690
+ import asyncio
691
+
692
+ from agenta import AsyncAgentaApi
693
+
694
+ client = AsyncAgentaApi(
695
+ api_key="YOUR_API_KEY",
696
+ )
697
+
698
+
699
+ async def main() -> None:
700
+ await client.evals.archive_evaluator(
701
+ evaluator_id="evaluator_id",
702
+ )
703
+
704
+
705
+ asyncio.run(main())
706
+ """
707
+ _response = await self._raw_client.archive_evaluator(
708
+ evaluator_id, request_options=request_options
709
+ )
710
+ return _response.data
711
+
712
+ async def unarchive_evaluator(
713
+ self,
714
+ evaluator_id: str,
715
+ *,
716
+ request_options: typing.Optional[RequestOptions] = None,
717
+ ) -> EvaluatorResponse:
718
+ """
719
+ Parameters
720
+ ----------
721
+ evaluator_id : str
722
+
723
+ request_options : typing.Optional[RequestOptions]
724
+ Request-specific configuration.
725
+
726
+ Returns
727
+ -------
728
+ EvaluatorResponse
729
+ Successful Response
730
+
731
+ Examples
732
+ --------
733
+ import asyncio
734
+
735
+ from agenta import AsyncAgentaApi
736
+
737
+ client = AsyncAgentaApi(
738
+ api_key="YOUR_API_KEY",
739
+ )
740
+
741
+
742
+ async def main() -> None:
743
+ await client.evals.unarchive_evaluator(
744
+ evaluator_id="evaluator_id",
745
+ )
746
+
747
+
748
+ asyncio.run(main())
749
+ """
750
+ _response = await self._raw_client.unarchive_evaluator(
751
+ evaluator_id, request_options=request_options
752
+ )
753
+ return _response.data
754
+
755
+ async def query_evaluators(
756
+ self,
757
+ *,
758
+ request: typing.Optional[EvaluatorQueryRequest] = None,
759
+ request_options: typing.Optional[RequestOptions] = None,
760
+ ) -> EvaluatorsResponse:
761
+ """
762
+ Parameters
763
+ ----------
764
+ request : typing.Optional[EvaluatorQueryRequest]
765
+
766
+ request_options : typing.Optional[RequestOptions]
767
+ Request-specific configuration.
768
+
769
+ Returns
770
+ -------
771
+ EvaluatorsResponse
772
+ Successful Response
773
+
774
+ Examples
775
+ --------
776
+ import asyncio
777
+
778
+ from agenta import AsyncAgentaApi
779
+
780
+ client = AsyncAgentaApi(
781
+ api_key="YOUR_API_KEY",
782
+ )
783
+
784
+
785
+ async def main() -> None:
786
+ await client.evals.query_evaluators()
787
+
788
+
789
+ asyncio.run(main())
790
+ """
791
+ _response = await self._raw_client.query_evaluators(
792
+ request=request, request_options=request_options
793
+ )
794
+ return _response.data
795
+
796
+ async def query_annotations(
797
+ self,
798
+ *,
799
+ request: typing.Optional[AnnotationQueryRequest] = None,
800
+ request_options: typing.Optional[RequestOptions] = None,
801
+ ) -> AnnotationsResponse:
802
+ """
803
+ Parameters
804
+ ----------
805
+ request : typing.Optional[AnnotationQueryRequest]
806
+
807
+ request_options : typing.Optional[RequestOptions]
808
+ Request-specific configuration.
809
+
810
+ Returns
811
+ -------
812
+ AnnotationsResponse
813
+ Successful Response
814
+
815
+ Examples
816
+ --------
817
+ import asyncio
818
+
819
+ from agenta import AsyncAgentaApi
820
+
821
+ client = AsyncAgentaApi(
822
+ api_key="YOUR_API_KEY",
823
+ )
824
+
825
+
826
+ async def main() -> None:
827
+ await client.evals.query_annotations()
828
+
829
+
830
+ asyncio.run(main())
831
+ """
832
+ _response = await self._raw_client.query_annotations(
833
+ request=request, request_options=request_options
834
+ )
835
+ return _response.data
836
+
837
+ async def create_annotation(
838
+ self,
839
+ *,
840
+ annotation: AnnotationCreate,
841
+ request_options: typing.Optional[RequestOptions] = None,
842
+ ) -> AnnotationResponse:
843
+ """
844
+ Parameters
845
+ ----------
846
+ annotation : AnnotationCreate
847
+
848
+ request_options : typing.Optional[RequestOptions]
849
+ Request-specific configuration.
850
+
851
+ Returns
852
+ -------
853
+ AnnotationResponse
854
+ Successful Response
855
+
856
+ Examples
857
+ --------
858
+ import asyncio
859
+
860
+ from agenta import (
861
+ AnnotationCreate,
862
+ AnnotationLink,
863
+ AnnotationReference,
864
+ AnnotationReferences,
865
+ AsyncAgentaApi,
866
+ )
867
+
868
+ client = AsyncAgentaApi(
869
+ api_key="YOUR_API_KEY",
870
+ )
871
+
872
+
873
+ async def main() -> None:
874
+ await client.evals.create_annotation(
875
+ annotation=AnnotationCreate(
876
+ data={},
877
+ references=AnnotationReferences(
878
+ evaluator=AnnotationReference(),
879
+ ),
880
+ links={
881
+ "key": AnnotationLink(
882
+ span_id="span_id",
883
+ trace_id="trace_id",
884
+ )
885
+ },
886
+ ),
887
+ )
888
+
889
+
890
+ asyncio.run(main())
891
+ """
892
+ _response = await self._raw_client.create_annotation(
893
+ annotation=annotation, request_options=request_options
894
+ )
895
+ return _response.data
896
+
897
+ async def fetch_annotation(
898
+ self,
899
+ trace_id: str,
900
+ span_id: str,
901
+ *,
902
+ request_options: typing.Optional[RequestOptions] = None,
903
+ ) -> AnnotationResponse:
904
+ """
905
+ Parameters
906
+ ----------
907
+ trace_id : str
908
+
909
+ span_id : str
910
+
911
+ request_options : typing.Optional[RequestOptions]
912
+ Request-specific configuration.
913
+
914
+ Returns
915
+ -------
916
+ AnnotationResponse
917
+ Successful Response
918
+
919
+ Examples
920
+ --------
921
+ import asyncio
922
+
923
+ from agenta import AsyncAgentaApi
924
+
925
+ client = AsyncAgentaApi(
926
+ api_key="YOUR_API_KEY",
927
+ )
928
+
929
+
930
+ async def main() -> None:
931
+ await client.evals.fetch_annotation(
932
+ trace_id="trace_id",
933
+ span_id="span_id",
934
+ )
935
+
936
+
937
+ asyncio.run(main())
938
+ """
939
+ _response = await self._raw_client.fetch_annotation(
940
+ trace_id, span_id, request_options=request_options
941
+ )
942
+ return _response.data
943
+
944
+ async def delete_annotation(
945
+ self,
946
+ trace_id: str,
947
+ span_id: str,
948
+ *,
949
+ request_options: typing.Optional[RequestOptions] = None,
950
+ ) -> AnnotationLinkResponse:
951
+ """
952
+ Parameters
953
+ ----------
954
+ trace_id : str
955
+
956
+ span_id : str
957
+
958
+ request_options : typing.Optional[RequestOptions]
959
+ Request-specific configuration.
960
+
961
+ Returns
962
+ -------
963
+ AnnotationLinkResponse
964
+ Successful Response
965
+
966
+ Examples
967
+ --------
968
+ import asyncio
969
+
970
+ from agenta import AsyncAgentaApi
971
+
972
+ client = AsyncAgentaApi(
973
+ api_key="YOUR_API_KEY",
974
+ )
975
+
976
+
977
+ async def main() -> None:
978
+ await client.evals.delete_annotation(
979
+ trace_id="trace_id",
980
+ span_id="span_id",
981
+ )
982
+
983
+
984
+ asyncio.run(main())
985
+ """
986
+ _response = await self._raw_client.delete_annotation(
987
+ trace_id, span_id, request_options=request_options
988
+ )
989
+ return _response.data
990
+
991
+ async def edit_annotation(
992
+ self,
993
+ trace_id: str,
994
+ span_id: str,
995
+ *,
996
+ annotation: AnnotationEdit,
997
+ request_options: typing.Optional[RequestOptions] = None,
998
+ ) -> AnnotationResponse:
999
+ """
1000
+ Parameters
1001
+ ----------
1002
+ trace_id : str
1003
+
1004
+ span_id : str
1005
+
1006
+ annotation : AnnotationEdit
1007
+
1008
+ request_options : typing.Optional[RequestOptions]
1009
+ Request-specific configuration.
1010
+
1011
+ Returns
1012
+ -------
1013
+ AnnotationResponse
1014
+ Successful Response
1015
+
1016
+ Examples
1017
+ --------
1018
+ import asyncio
1019
+
1020
+ from agenta import AnnotationEdit, AsyncAgentaApi
1021
+
1022
+ client = AsyncAgentaApi(
1023
+ api_key="YOUR_API_KEY",
1024
+ )
1025
+
1026
+
1027
+ async def main() -> None:
1028
+ await client.evals.edit_annotation(
1029
+ trace_id="trace_id",
1030
+ span_id="span_id",
1031
+ annotation=AnnotationEdit(
1032
+ data={},
1033
+ ),
1034
+ )
1035
+
1036
+
1037
+ asyncio.run(main())
1038
+ """
1039
+ _response = await self._raw_client.edit_annotation(
1040
+ trace_id, span_id, annotation=annotation, request_options=request_options
1041
+ )
1042
+ return _response.data