Skip to content

Commit cd7c9b7

Browse files
feat(api): api update
1 parent e1effb5 commit cd7c9b7

7 files changed

Lines changed: 4 additions & 41 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-eeb5bf63b18d948611eec48d0225e9bba63b170f64eeeb35d91825724b7cf6c3.yml
3-
openapi_spec_hash: 5bbd18a405a11e8497d38a5a88b98018
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-636aa63c588134e6f47fc45212049593d91f810a9c7bd8d7a57810cf1b5ffc92.yml
3+
openapi_spec_hash: c76a42d4510aeafd896bc0d596f17af4
44
config_hash: fb079ef7936611b032568661b8165f19

src/agentex/resources/spans.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def create(
5757
input: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
5858
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
5959
parent_id: Optional[str] | Omit = omit,
60-
task_id: Optional[str] | Omit = omit,
6160
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6261
# The extra values given here take precedence over values defined on the client or passed to this method.
6362
extra_headers: Headers | None = None,
@@ -87,8 +86,6 @@ def create(
8786
8887
parent_id: ID of the parent span if this is a child span in a trace
8988
90-
task_id: ID of the task this span belongs to
91-
9289
extra_headers: Send extra headers
9390
9491
extra_query: Add additional query parameters to the request
@@ -110,7 +107,6 @@ def create(
110107
"input": input,
111108
"output": output,
112109
"parent_id": parent_id,
113-
"task_id": task_id,
114110
},
115111
span_create_params.SpanCreateParams,
116112
),
@@ -164,7 +160,6 @@ def update(
164160
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
165161
parent_id: Optional[str] | Omit = omit,
166162
start_time: Union[str, datetime, None] | Omit = omit,
167-
task_id: Optional[str] | Omit = omit,
168163
trace_id: Optional[str] | Omit = omit,
169164
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
170165
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -191,8 +186,6 @@ def update(
191186
192187
start_time: The time the span started
193188
194-
task_id: ID of the task this span belongs to
195-
196189
trace_id: Unique identifier for the trace this span belongs to
197190
198191
extra_headers: Send extra headers
@@ -216,7 +209,6 @@ def update(
216209
"output": output,
217210
"parent_id": parent_id,
218211
"start_time": start_time,
219-
"task_id": task_id,
220212
"trace_id": trace_id,
221213
},
222214
span_update_params.SpanUpdateParams,
@@ -234,7 +226,6 @@ def list(
234226
order_by: Optional[str] | Omit = omit,
235227
order_direction: str | Omit = omit,
236228
page_number: int | Omit = omit,
237-
task_id: Optional[str] | Omit = omit,
238229
trace_id: Optional[str] | Omit = omit,
239230
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
240231
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -244,7 +235,7 @@ def list(
244235
timeout: float | httpx.Timeout | None | NotGiven = not_given,
245236
) -> SpanListResponse:
246237
"""
247-
List spans, optionally filtered by trace_id and/or task_id
238+
List all spans for a given trace ID
248239
249240
Args:
250241
extra_headers: Send extra headers
@@ -268,7 +259,6 @@ def list(
268259
"order_by": order_by,
269260
"order_direction": order_direction,
270261
"page_number": page_number,
271-
"task_id": task_id,
272262
"trace_id": trace_id,
273263
},
274264
span_list_params.SpanListParams,
@@ -310,7 +300,6 @@ async def create(
310300
input: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
311301
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
312302
parent_id: Optional[str] | Omit = omit,
313-
task_id: Optional[str] | Omit = omit,
314303
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
315304
# The extra values given here take precedence over values defined on the client or passed to this method.
316305
extra_headers: Headers | None = None,
@@ -340,8 +329,6 @@ async def create(
340329
341330
parent_id: ID of the parent span if this is a child span in a trace
342331
343-
task_id: ID of the task this span belongs to
344-
345332
extra_headers: Send extra headers
346333
347334
extra_query: Add additional query parameters to the request
@@ -363,7 +350,6 @@ async def create(
363350
"input": input,
364351
"output": output,
365352
"parent_id": parent_id,
366-
"task_id": task_id,
367353
},
368354
span_create_params.SpanCreateParams,
369355
),
@@ -417,7 +403,6 @@ async def update(
417403
output: Union[Dict[str, object], Iterable[Dict[str, object]], None] | Omit = omit,
418404
parent_id: Optional[str] | Omit = omit,
419405
start_time: Union[str, datetime, None] | Omit = omit,
420-
task_id: Optional[str] | Omit = omit,
421406
trace_id: Optional[str] | Omit = omit,
422407
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
423408
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -444,8 +429,6 @@ async def update(
444429
445430
start_time: The time the span started
446431
447-
task_id: ID of the task this span belongs to
448-
449432
trace_id: Unique identifier for the trace this span belongs to
450433
451434
extra_headers: Send extra headers
@@ -469,7 +452,6 @@ async def update(
469452
"output": output,
470453
"parent_id": parent_id,
471454
"start_time": start_time,
472-
"task_id": task_id,
473455
"trace_id": trace_id,
474456
},
475457
span_update_params.SpanUpdateParams,
@@ -487,7 +469,6 @@ async def list(
487469
order_by: Optional[str] | Omit = omit,
488470
order_direction: str | Omit = omit,
489471
page_number: int | Omit = omit,
490-
task_id: Optional[str] | Omit = omit,
491472
trace_id: Optional[str] | Omit = omit,
492473
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
493474
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -497,7 +478,7 @@ async def list(
497478
timeout: float | httpx.Timeout | None | NotGiven = not_given,
498479
) -> SpanListResponse:
499480
"""
500-
List spans, optionally filtered by trace_id and/or task_id
481+
List all spans for a given trace ID
501482
502483
Args:
503484
extra_headers: Send extra headers
@@ -521,7 +502,6 @@ async def list(
521502
"order_by": order_by,
522503
"order_direction": order_direction,
523504
"page_number": page_number,
524-
"task_id": task_id,
525505
"trace_id": trace_id,
526506
},
527507
span_list_params.SpanListParams,

src/agentex/types/span.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,3 @@ class Span(BaseModel):
3434

3535
parent_id: Optional[str] = None
3636
"""ID of the parent span if this is a child span in a trace"""
37-
38-
task_id: Optional[str] = None
39-
"""ID of the task this span belongs to"""

src/agentex/types/span_create_params.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,3 @@ class SpanCreateParams(TypedDict, total=False):
3838

3939
parent_id: Optional[str]
4040
"""ID of the parent span if this is a child span in a trace"""
41-
42-
task_id: Optional[str]
43-
"""ID of the task this span belongs to"""

src/agentex/types/span_list_params.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ class SpanListParams(TypedDict, total=False):
1717

1818
page_number: int
1919

20-
task_id: Optional[str]
21-
2220
trace_id: Optional[str]

src/agentex/types/span_update_params.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,5 @@ class SpanUpdateParams(TypedDict, total=False):
3333
start_time: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
3434
"""The time the span started"""
3535

36-
task_id: Optional[str]
37-
"""ID of the task this span belongs to"""
38-
3936
trace_id: Optional[str]
4037
"""Unique identifier for the trace this span belongs to"""

tests/api_resources/test_spans.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def test_method_create_with_all_params(self, client: Agentex) -> None:
4242
input={"foo": "bar"},
4343
output={"foo": "bar"},
4444
parent_id="parent_id",
45-
task_id="task_id",
4645
)
4746
assert_matches_type(Span, span, path=["response"])
4847

@@ -138,7 +137,6 @@ def test_method_update_with_all_params(self, client: Agentex) -> None:
138137
output={"foo": "bar"},
139138
parent_id="parent_id",
140139
start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
141-
task_id="task_id",
142140
trace_id="trace_id",
143141
)
144142
assert_matches_type(Span, span, path=["response"])
@@ -191,7 +189,6 @@ def test_method_list_with_all_params(self, client: Agentex) -> None:
191189
order_by="order_by",
192190
order_direction="order_direction",
193191
page_number=1,
194-
task_id="task_id",
195192
trace_id="trace_id",
196193
)
197194
assert_matches_type(SpanListResponse, span, path=["response"])
@@ -247,7 +244,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncAgentex) -
247244
input={"foo": "bar"},
248245
output={"foo": "bar"},
249246
parent_id="parent_id",
250-
task_id="task_id",
251247
)
252248
assert_matches_type(Span, span, path=["response"])
253249

@@ -343,7 +339,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncAgentex) -
343339
output={"foo": "bar"},
344340
parent_id="parent_id",
345341
start_time=parse_datetime("2019-12-27T18:11:19.117Z"),
346-
task_id="task_id",
347342
trace_id="trace_id",
348343
)
349344
assert_matches_type(Span, span, path=["response"])
@@ -396,7 +391,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) ->
396391
order_by="order_by",
397392
order_direction="order_direction",
398393
page_number=1,
399-
task_id="task_id",
400394
trace_id="trace_id",
401395
)
402396
assert_matches_type(SpanListResponse, span, path=["response"])

0 commit comments

Comments
 (0)