agenta 0.27.7a1__py3-none-any.whl → 0.27.7a2__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 (48) hide show
  1. agenta/client/backend/__init__.py +63 -0
  2. agenta/client/backend/client.py +22 -22
  3. agenta/client/backend/core/http_client.py +15 -7
  4. agenta/client/backend/observability/client.py +4 -4
  5. agenta/client/backend/observability_v_1/__init__.py +5 -0
  6. agenta/client/backend/observability_v_1/client.py +560 -0
  7. agenta/client/backend/observability_v_1/types/__init__.py +6 -0
  8. agenta/client/backend/observability_v_1/types/format.py +5 -0
  9. agenta/client/backend/observability_v_1/types/query_traces_response.py +11 -0
  10. agenta/client/backend/types/__init__.py +58 -0
  11. agenta/client/backend/types/agenta_node_dto.py +48 -0
  12. agenta/client/backend/types/agenta_node_dto_nodes_value.py +6 -0
  13. agenta/client/backend/types/agenta_nodes_response.py +30 -0
  14. agenta/client/backend/types/agenta_root_dto.py +30 -0
  15. agenta/client/backend/types/agenta_roots_response.py +30 -0
  16. agenta/client/backend/types/agenta_tree_dto.py +30 -0
  17. agenta/client/backend/types/agenta_trees_response.py +30 -0
  18. agenta/client/backend/types/collect_status_response.py +22 -0
  19. agenta/client/backend/types/exception_dto.py +26 -0
  20. agenta/client/backend/types/link_dto.py +24 -0
  21. agenta/client/backend/types/node_dto.py +24 -0
  22. agenta/client/backend/types/node_type.py +19 -0
  23. agenta/client/backend/types/o_tel_context_dto.py +22 -0
  24. agenta/client/backend/types/o_tel_event_dto.py +23 -0
  25. agenta/client/backend/types/o_tel_extra_dto.py +26 -0
  26. agenta/client/backend/types/o_tel_link_dto.py +23 -0
  27. agenta/client/backend/types/o_tel_span_dto.py +37 -0
  28. agenta/client/backend/types/o_tel_span_kind.py +15 -0
  29. agenta/client/backend/types/o_tel_spans_response.py +24 -0
  30. agenta/client/backend/types/o_tel_status_code.py +8 -0
  31. agenta/client/backend/types/parent_dto.py +21 -0
  32. agenta/client/backend/types/root_dto.py +21 -0
  33. agenta/client/backend/types/span_dto.py +54 -0
  34. agenta/client/backend/types/span_dto_nodes_value.py +9 -0
  35. agenta/client/backend/types/status_code.py +5 -0
  36. agenta/client/backend/types/status_dto.py +23 -0
  37. agenta/client/backend/types/time_dto.py +23 -0
  38. agenta/client/backend/types/tree_dto.py +23 -0
  39. agenta/client/backend/types/tree_type.py +5 -0
  40. agenta/client/backend/variants/client.py +24 -16
  41. agenta/sdk/__init__.py +2 -0
  42. agenta/sdk/decorators/routing.py +1 -1
  43. agenta/sdk/tracing/inline.py +29 -140
  44. agenta/sdk/types.py +5 -2
  45. {agenta-0.27.7a1.dist-info → agenta-0.27.7a2.dist-info}/METADATA +1 -1
  46. {agenta-0.27.7a1.dist-info → agenta-0.27.7a2.dist-info}/RECORD +48 -14
  47. {agenta-0.27.7a1.dist-info → agenta-0.27.7a2.dist-info}/WHEEL +0 -0
  48. {agenta-0.27.7a1.dist-info → agenta-0.27.7a2.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .types import (
4
+ AgentaNodeDto,
5
+ AgentaNodeDtoNodesValue,
6
+ AgentaNodesResponse,
7
+ AgentaRootDto,
8
+ AgentaRootsResponse,
9
+ AgentaTreeDto,
10
+ AgentaTreesResponse,
4
11
  AggregatedResult,
5
12
  AggregatedResultEvaluatorConfig,
6
13
  App,
@@ -8,6 +15,7 @@ from .types import (
8
15
  AppVariantRevision,
9
16
  BaseOutput,
10
17
  BodyImportTestset,
18
+ CollectStatusResponse,
11
19
  ConfigDb,
12
20
  ConfigDto,
13
21
  ConfigResponseModel,
@@ -32,6 +40,7 @@ from .types import (
32
40
  EvaluatorConfig,
33
41
  EvaluatorMappingOutputInterface,
34
42
  EvaluatorOutputInterface,
43
+ ExceptionDto,
35
44
  GetConfigResponse,
36
45
  HttpValidationError,
37
46
  HumanEvaluation,
@@ -43,30 +52,50 @@ from .types import (
43
52
  Image,
44
53
  InviteRequest,
45
54
  LifecycleDto,
55
+ LinkDto,
46
56
  ListApiKeysResponse,
47
57
  LlmRunRateLimit,
48
58
  LlmTokens,
49
59
  LmProvidersEnum,
50
60
  NewHumanEvaluation,
51
61
  NewTestset,
62
+ NodeDto,
63
+ NodeType,
64
+ OTelContextDto,
65
+ OTelEventDto,
66
+ OTelExtraDto,
67
+ OTelLinkDto,
68
+ OTelSpanDto,
69
+ OTelSpanKind,
70
+ OTelSpansResponse,
71
+ OTelStatusCode,
52
72
  Organization,
53
73
  OrganizationOutput,
54
74
  Outputs,
75
+ ParentDto,
55
76
  Permission,
56
77
  ReferenceDto,
57
78
  ReferenceRequestModel,
58
79
  Result,
80
+ RootDto,
59
81
  Score,
60
82
  SimpleEvaluationOutput,
61
83
  Span,
62
84
  SpanDetail,
85
+ SpanDto,
86
+ SpanDtoNodesValue,
63
87
  SpanStatusCode,
64
88
  SpanVariant,
89
+ StatusCode,
90
+ StatusDto,
65
91
  Template,
66
92
  TemplateImageInfo,
67
93
  TestSetOutputResponse,
68
94
  TestSetSimpleResponse,
95
+ TimeDto,
69
96
  TraceDetail,
97
+ TreeDto,
98
+ TreeType,
70
99
  UpdateAppOutput,
71
100
  Uri,
72
101
  ValidationError,
@@ -90,16 +119,25 @@ from . import (
90
119
  evaluations,
91
120
  evaluators,
92
121
  observability,
122
+ observability_v_1,
93
123
  testsets,
94
124
  variants,
95
125
  )
96
126
  from .client import AgentaApi, AsyncAgentaApi
97
127
  from .containers import ContainerTemplatesResponse
128
+ from .observability_v_1 import Format, QueryTracesResponse
98
129
  from .variants import AddVariantFromBaseAndConfigResponse
99
130
 
100
131
  __all__ = [
101
132
  "AddVariantFromBaseAndConfigResponse",
102
133
  "AgentaApi",
134
+ "AgentaNodeDto",
135
+ "AgentaNodeDtoNodesValue",
136
+ "AgentaNodesResponse",
137
+ "AgentaRootDto",
138
+ "AgentaRootsResponse",
139
+ "AgentaTreeDto",
140
+ "AgentaTreesResponse",
103
141
  "AggregatedResult",
104
142
  "AggregatedResultEvaluatorConfig",
105
143
  "App",
@@ -108,6 +146,7 @@ __all__ = [
108
146
  "AsyncAgentaApi",
109
147
  "BaseOutput",
110
148
  "BodyImportTestset",
149
+ "CollectStatusResponse",
111
150
  "ConfigDb",
112
151
  "ConfigDto",
113
152
  "ConfigResponseModel",
@@ -133,6 +172,8 @@ __all__ = [
133
172
  "EvaluatorConfig",
134
173
  "EvaluatorMappingOutputInterface",
135
174
  "EvaluatorOutputInterface",
175
+ "ExceptionDto",
176
+ "Format",
136
177
  "GetConfigResponse",
137
178
  "HttpValidationError",
138
179
  "HumanEvaluation",
@@ -144,30 +185,51 @@ __all__ = [
144
185
  "Image",
145
186
  "InviteRequest",
146
187
  "LifecycleDto",
188
+ "LinkDto",
147
189
  "ListApiKeysResponse",
148
190
  "LlmRunRateLimit",
149
191
  "LlmTokens",
150
192
  "LmProvidersEnum",
151
193
  "NewHumanEvaluation",
152
194
  "NewTestset",
195
+ "NodeDto",
196
+ "NodeType",
197
+ "OTelContextDto",
198
+ "OTelEventDto",
199
+ "OTelExtraDto",
200
+ "OTelLinkDto",
201
+ "OTelSpanDto",
202
+ "OTelSpanKind",
203
+ "OTelSpansResponse",
204
+ "OTelStatusCode",
153
205
  "Organization",
154
206
  "OrganizationOutput",
155
207
  "Outputs",
208
+ "ParentDto",
156
209
  "Permission",
210
+ "QueryTracesResponse",
157
211
  "ReferenceDto",
158
212
  "ReferenceRequestModel",
159
213
  "Result",
214
+ "RootDto",
160
215
  "Score",
161
216
  "SimpleEvaluationOutput",
162
217
  "Span",
163
218
  "SpanDetail",
219
+ "SpanDto",
220
+ "SpanDtoNodesValue",
164
221
  "SpanStatusCode",
165
222
  "SpanVariant",
223
+ "StatusCode",
224
+ "StatusDto",
166
225
  "Template",
167
226
  "TemplateImageInfo",
168
227
  "TestSetOutputResponse",
169
228
  "TestSetSimpleResponse",
229
+ "TimeDto",
170
230
  "TraceDetail",
231
+ "TreeDto",
232
+ "TreeType",
171
233
  "UnprocessableEntityError",
172
234
  "UpdateAppOutput",
173
235
  "Uri",
@@ -189,6 +251,7 @@ __all__ = [
189
251
  "evaluations",
190
252
  "evaluators",
191
253
  "observability",
254
+ "observability_v_1",
192
255
  "testsets",
193
256
  "variants",
194
257
  ]
@@ -13,6 +13,7 @@ from .containers.client import ContainersClient
13
13
  from .environments.client import EnvironmentsClient
14
14
  from .bases.client import BasesClient
15
15
  from .configs.client import ConfigsClient
16
+ from .observability_v_1.client import ObservabilityV1Client
16
17
  from .core.request_options import RequestOptions
17
18
  from .types.list_api_keys_response import ListApiKeysResponse
18
19
  from .core.pydantic_utilities import parse_obj_as
@@ -40,6 +41,7 @@ from .containers.client import AsyncContainersClient
40
41
  from .environments.client import AsyncEnvironmentsClient
41
42
  from .bases.client import AsyncBasesClient
42
43
  from .configs.client import AsyncConfigsClient
44
+ from .observability_v_1.client import AsyncObservabilityV1Client
43
45
 
44
46
  # this is used as the default value for optional parameters
45
47
  OMIT = typing.cast(typing.Any, ...)
@@ -89,17 +91,13 @@ class AgentaApi:
89
91
  self._client_wrapper = SyncClientWrapper(
90
92
  base_url=base_url,
91
93
  api_key=api_key,
92
- httpx_client=(
93
- httpx_client
94
- if httpx_client is not None
95
- else (
96
- httpx.Client(
97
- timeout=_defaulted_timeout, follow_redirects=follow_redirects
98
- )
99
- if follow_redirects is not None
100
- else httpx.Client(timeout=_defaulted_timeout)
101
- )
102
- ),
94
+ httpx_client=httpx_client
95
+ if httpx_client is not None
96
+ else httpx.Client(
97
+ timeout=_defaulted_timeout, follow_redirects=follow_redirects
98
+ )
99
+ if follow_redirects is not None
100
+ else httpx.Client(timeout=_defaulted_timeout),
103
101
  timeout=_defaulted_timeout,
104
102
  )
105
103
  self.observability = ObservabilityClient(client_wrapper=self._client_wrapper)
@@ -112,6 +110,9 @@ class AgentaApi:
112
110
  self.environments = EnvironmentsClient(client_wrapper=self._client_wrapper)
113
111
  self.bases = BasesClient(client_wrapper=self._client_wrapper)
114
112
  self.configs = ConfigsClient(client_wrapper=self._client_wrapper)
113
+ self.observability_v_1 = ObservabilityV1Client(
114
+ client_wrapper=self._client_wrapper
115
+ )
115
116
 
116
117
  def list_api_keys(
117
118
  self, *, request_options: typing.Optional[RequestOptions] = None
@@ -1619,17 +1620,13 @@ class AsyncAgentaApi:
1619
1620
  self._client_wrapper = AsyncClientWrapper(
1620
1621
  base_url=base_url,
1621
1622
  api_key=api_key,
1622
- httpx_client=(
1623
- httpx_client
1624
- if httpx_client is not None
1625
- else (
1626
- httpx.AsyncClient(
1627
- timeout=_defaulted_timeout, follow_redirects=follow_redirects
1628
- )
1629
- if follow_redirects is not None
1630
- else httpx.AsyncClient(timeout=_defaulted_timeout)
1631
- )
1632
- ),
1623
+ httpx_client=httpx_client
1624
+ if httpx_client is not None
1625
+ else httpx.AsyncClient(
1626
+ timeout=_defaulted_timeout, follow_redirects=follow_redirects
1627
+ )
1628
+ if follow_redirects is not None
1629
+ else httpx.AsyncClient(timeout=_defaulted_timeout),
1633
1630
  timeout=_defaulted_timeout,
1634
1631
  )
1635
1632
  self.observability = AsyncObservabilityClient(
@@ -1644,6 +1641,9 @@ class AsyncAgentaApi:
1644
1641
  self.environments = AsyncEnvironmentsClient(client_wrapper=self._client_wrapper)
1645
1642
  self.bases = AsyncBasesClient(client_wrapper=self._client_wrapper)
1646
1643
  self.configs = AsyncConfigsClient(client_wrapper=self._client_wrapper)
1644
+ self.observability_v_1 = AsyncObservabilityV1Client(
1645
+ client_wrapper=self._client_wrapper
1646
+ )
1647
1647
 
1648
1648
  async def list_api_keys(
1649
1649
  self, *, request_options: typing.Optional[RequestOptions] = None
@@ -148,9 +148,9 @@ def get_request_body(
148
148
  json_body = maybe_filter_request_body(json, request_options, omit)
149
149
 
150
150
  # If you have an empty JSON body, you should just send None
151
- return (json_body if json_body != {} else None), (
152
- data_body if data_body != {} else None
153
- )
151
+ return (
152
+ json_body if json_body != {} else None
153
+ ), data_body if data_body != {} else None
154
154
 
155
155
 
156
156
  class HttpClient:
@@ -250,7 +250,9 @@ class HttpClient:
250
250
  data=data_body,
251
251
  content=content,
252
252
  files=(
253
- convert_file_dict_to_httpx_tuples(remove_none_from_dict(files))
253
+ convert_file_dict_to_httpx_tuples(
254
+ remove_omit_from_dict(remove_none_from_dict(files), omit)
255
+ )
254
256
  if (files is not None and files is not omit)
255
257
  else None
256
258
  ),
@@ -351,7 +353,9 @@ class HttpClient:
351
353
  data=data_body,
352
354
  content=content,
353
355
  files=(
354
- convert_file_dict_to_httpx_tuples(remove_none_from_dict(files))
356
+ convert_file_dict_to_httpx_tuples(
357
+ remove_omit_from_dict(remove_none_from_dict(files), omit)
358
+ )
355
359
  if (files is not None and files is not omit)
356
360
  else None
357
361
  ),
@@ -458,7 +462,9 @@ class AsyncHttpClient:
458
462
  data=data_body,
459
463
  content=content,
460
464
  files=(
461
- convert_file_dict_to_httpx_tuples(remove_none_from_dict(files))
465
+ convert_file_dict_to_httpx_tuples(
466
+ remove_omit_from_dict(remove_none_from_dict(files), omit)
467
+ )
462
468
  if files is not None
463
469
  else None
464
470
  ),
@@ -558,7 +564,9 @@ class AsyncHttpClient:
558
564
  data=data_body,
559
565
  content=content,
560
566
  files=(
561
- convert_file_dict_to_httpx_tuples(remove_none_from_dict(files))
567
+ convert_file_dict_to_httpx_tuples(
568
+ remove_omit_from_dict(remove_none_from_dict(files), omit)
569
+ )
562
570
  if files is not None
563
571
  else None
564
572
  ),
@@ -280,7 +280,7 @@ class ObservabilityClient:
280
280
  raise ApiError(status_code=_response.status_code, body=_response.text)
281
281
  raise ApiError(status_code=_response.status_code, body=_response_json)
282
282
 
283
- def delete_traces(
283
+ def delete_traces_legacy(
284
284
  self,
285
285
  *,
286
286
  request: typing.Sequence[str],
@@ -307,7 +307,7 @@ class ObservabilityClient:
307
307
  api_key="YOUR_API_KEY",
308
308
  base_url="https://yourhost.com/path/to/api",
309
309
  )
310
- client.observability.delete_traces(
310
+ client.observability.delete_traces_legacy(
311
311
  request=["string"],
312
312
  )
313
313
  """
@@ -901,7 +901,7 @@ class AsyncObservabilityClient:
901
901
  raise ApiError(status_code=_response.status_code, body=_response.text)
902
902
  raise ApiError(status_code=_response.status_code, body=_response_json)
903
903
 
904
- async def delete_traces(
904
+ async def delete_traces_legacy(
905
905
  self,
906
906
  *,
907
907
  request: typing.Sequence[str],
@@ -933,7 +933,7 @@ class AsyncObservabilityClient:
933
933
 
934
934
 
935
935
  async def main() -> None:
936
- await client.observability.delete_traces(
936
+ await client.observability.delete_traces_legacy(
937
937
  request=["string"],
938
938
  )
939
939
 
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import Format, QueryTracesResponse
4
+
5
+ __all__ = ["Format", "QueryTracesResponse"]