Skip to content

Commit 2ca4485

Browse files
feat: Implement FastAPI router system
1 parent de67c1e commit 2ca4485

File tree

4 files changed

+45
-2
lines changed

4 files changed

+45
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-c53a119bf22adab585059b5426b8e4a5d9582783bce071ad600c22ab0ebc6578.yml
3-
openapi_spec_hash: c55f186ff8688e7ccca399cc7b4a87a0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-418ccf3126ab086a66c822c60204b95ef3192ffa64340bd3a1537ae46b830892.yml
3+
openapi_spec_hash: 885b75e847506a930b709eb630535912
44
config_hash: 39578cfdeb4a10121f2cb3fa3e4d5e20

src/llama_stack_client/resources/batches.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ def create(
7373
Create a new batch for processing multiple API requests.
7474
7575
Args:
76+
completion_window: The time window within which the batch should be processed.
77+
78+
endpoint: The endpoint to be used for all requests in the batch.
79+
80+
input_file_id: The ID of an uploaded file containing requests for the batch.
81+
82+
idempotency_key: Optional idempotency key. When provided, enables idempotent behavior.
83+
84+
metadata: Optional metadata for the batch.
85+
7686
extra_headers: Send extra headers
7787
7888
extra_query: Add additional query parameters to the request
@@ -114,6 +124,8 @@ def retrieve(
114124
Retrieve information about a specific batch.
115125
116126
Args:
127+
batch_id: The ID of the batch to retrieve.
128+
117129
extra_headers: Send extra headers
118130
119131
extra_query: Add additional query parameters to the request
@@ -148,6 +160,10 @@ def list(
148160
List all batches for the current user.
149161
150162
Args:
163+
after: Optional cursor for pagination. Returns batches after this ID.
164+
165+
limit: Maximum number of batches to return. Defaults to 20.
166+
151167
extra_headers: Send extra headers
152168
153169
extra_query: Add additional query parameters to the request
@@ -190,6 +206,8 @@ def cancel(
190206
Cancel a batch that is in progress.
191207
192208
Args:
209+
batch_id: The ID of the batch to cancel.
210+
193211
extra_headers: Send extra headers
194212
195213
extra_query: Add additional query parameters to the request
@@ -248,6 +266,16 @@ async def create(
248266
Create a new batch for processing multiple API requests.
249267
250268
Args:
269+
completion_window: The time window within which the batch should be processed.
270+
271+
endpoint: The endpoint to be used for all requests in the batch.
272+
273+
input_file_id: The ID of an uploaded file containing requests for the batch.
274+
275+
idempotency_key: Optional idempotency key. When provided, enables idempotent behavior.
276+
277+
metadata: Optional metadata for the batch.
278+
251279
extra_headers: Send extra headers
252280
253281
extra_query: Add additional query parameters to the request
@@ -289,6 +317,8 @@ async def retrieve(
289317
Retrieve information about a specific batch.
290318
291319
Args:
320+
batch_id: The ID of the batch to retrieve.
321+
292322
extra_headers: Send extra headers
293323
294324
extra_query: Add additional query parameters to the request
@@ -323,6 +353,10 @@ def list(
323353
List all batches for the current user.
324354
325355
Args:
356+
after: Optional cursor for pagination. Returns batches after this ID.
357+
358+
limit: Maximum number of batches to return. Defaults to 20.
359+
326360
extra_headers: Send extra headers
327361
328362
extra_query: Add additional query parameters to the request
@@ -365,6 +399,8 @@ async def cancel(
365399
Cancel a batch that is in progress.
366400
367401
Args:
402+
batch_id: The ID of the batch to cancel.
403+
368404
extra_headers: Send extra headers
369405
370406
extra_query: Add additional query parameters to the request

src/llama_stack_client/types/batch_create_params.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616

1717
class BatchCreateParams(TypedDict, total=False):
1818
completion_window: Required[Literal["24h"]]
19+
"""The time window within which the batch should be processed."""
1920

2021
endpoint: Required[str]
22+
"""The endpoint to be used for all requests in the batch."""
2123

2224
input_file_id: Required[str]
25+
"""The ID of an uploaded file containing requests for the batch."""
2326

2427
idempotency_key: Optional[str]
28+
"""Optional idempotency key. When provided, enables idempotent behavior."""
2529

2630
metadata: Optional[Dict[str, str]]
31+
"""Optional metadata for the batch."""

src/llama_stack_client/types/batch_list_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616

1717
class BatchListParams(TypedDict, total=False):
1818
after: Optional[str]
19+
"""Optional cursor for pagination. Returns batches after this ID."""
1920

2021
limit: int
22+
"""Maximum number of batches to return. Defaults to 20."""

0 commit comments

Comments
 (0)